首先安装socat,我是centos环境
yum install socat -y
1、安装 Acme
curl https://get.acme.sh | sh
2、填写邮箱(非必须)
~/.acme.sh/acme.sh --register-account -m 你的邮箱
3、申请证书
~/.acme.sh/acme.sh --issue -d 你的域名 --standalone
4、更改证书存放位置
https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
详细教程:https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E