先安装acme.sh
curl https://get.acme.sh | sh -s email=email@outlook.com
安装完成之后,会自动在~/.bashrc加入环境初始化的脚本,可以退出登录,重新登录生效
设置默认ca为letsencrypt
acme.sh --set-default-ca --server letsencrypt
申请证书
acme.sh --issue -d xxx.xxx.xxx.xxx --standalone --debug --certificate-profile shortlived --days 6
acme.sh --list
命令中
xxx.xxx.xxx.xxx:IP地址
–standalone:表示自动开启80端口监听做验证(80端口不能被其他进程占用)
–certificate-profile shortlived –days 6:表示短暂的证书,IP类型只能申请短暂的
发表回复