apt install -y socat
curl https://get.acme.sh | sh

注册账户:

~/.acme.sh/acme.sh --register-account -m [email protected]

申请证书:

~/.acme.sh/acme.sh --issue -d xxx.com --standalone

安装证书:

~/.acme.sh/acme.sh --installcert -d xxx.com --key-file /root/private.key --fullchain-file /root/cert.crt

查看端口占用:

apt install -y lsof
lsof -i:80

查看ssl证书什么时候过期:

echo | openssl s_client -servername xxx.com -connect "xxx.com":443 2>/dev/null | openssl x509 -noout -dates