Ubuntu 18
mkcert
https
mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration
install Linuxbrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
$ brew --version
Homebrew 2.1.11
Homebrew/linuxbrew-core (git revision 0c03; last commit 2019-09-16)
https://docs.brew.sh/Homebrew-on-Linux
install mkcert
brew install mkcert
$ brew --version
Homebrew 2.1.11
Homebrew/linuxbrew-core (git revision 0c03; last commit 2019-09-16)
$ brew install mkcert
==> Downloading https://linuxbrew.bintray.com/bottles/mkcert-1.4.0.x86_64_linux.
==> Downloading from https://akamai.bintray.com/a4/a40257c8cc9547ab98595a907e3f2
######################################################################## 100.0%
==> Pouring mkcert-1.4.0.x86_64_linux.bottle.tar.gz
🍺 /home/linuxbrew/.linuxbrew/Cellar/mkcert/1.4.0: 7 files, 4.7MB
$ mkcert -install
Created a new local CA at "/home/w/.local/share/mkcert" 💥
[sudo] password for w:
The local CA is now installed in the system trust store! ⚡️
Warning: "certutil" is not available, so the CA can't be automatically installed in Firefox and/or Chrome/Chromium! ⚠️
Install "certutil" with "apt install libnss3-tools" and re-run "mkcert -install" 👈
$ mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1
Using the local CA at "/home/w/.local/share/mkcert" ✨
Warning: the local CA is not installed in the Firefox and/or Chrome/Chromium trust store! ⚠️
Run "mkcert -install" to avoid verification errors ‼️
Created a new certificate valid for the following names 📜
- "example.com"
- "*.example.com"
- "example.test"
- "localhost"
- "127.0.0.1"
- "::1"
Reminder: X.509 wildcards only go one level deep, so this won't match a.b.example.com ℹ️
The certificate is at "./example.com+5.pem" and the key at "./example.com+5-key.pem" ✅
网友评论