安装certbot
yum install -y epel-release
yum install -y certbot
配置生成证书
certbot certonly --standalone -d xx.xxxx.com.cn -m xxxx@xxx.com --agree-tos
此处需要保证80端口不被占用。
证书生成地址
/etc/letsencrypt/live/自己的域名
证书信息合成p12
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out xxx.p12
配置springboot证书
server:
#port: 2010
port: 443
tomcat:
max-http-post-size: -1
ssl:
key-store: xxxx.p12
key-store-password: 123456
查看申请的证书
certbot certificates
续期证书
certbot renew