几台KS3C都装了Proxmox,一直都证书错误,挺烦的,今天搜索了一番,终于把证书搞定了,用的是Let's Encrypt的免费证书:)记录一下:
git clone https://github.com/certbot/certbot /opt/letsencrypt ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot certbot certonly --expand --agree-tos --text --non-interactive \ --standalone \ --email 你的邮箱 \ -d 你的域名 cat << EOF > /root/letsencrypt.sh #!/bin/bash certbot renew --no-self-upgrade mv /etc/pve/local/pve-ssl.pem /root/ mv /etc/pve/local/pve-ssl.key /root/ mv /etc/pve/pve-root-ca.pem /root/ cp /etc/letsencrypt/live/你的域名/fullchain.pem /etc/pve/local/pve-ssl.pem cp /etc/letsencrypt/live/你的域名/privkey.pem /etc/pve/local/pve-ssl.key cp /etc/letsencrypt/live/你的域名/chain.pem /etc/pve/pve-root-ca.pem service pveproxy restart service pvedaemon restart EOF chmod +x /root/letsencrypt.sh echo '@daily /root/letsencrypt.sh' > /etc/cron.d/letsencrypt /root/letsencrypt.sh
我的微信
我的微信
微信扫一扫
评论