linux
2025/6/30小于 1 分钟约 202 字
使用certbot为域名证书过期续签
安装snapd 并配置 certbot & nginx
yum install snapd -y
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
echo 'export PATH="$PATH:/snap/bin"' >> ~/.bashrc
source ~/.bashrc
// 到此 安装snapd 结束
snap install --classic certbot
setenforce 0 # 关闭linux
certbot --version
snap set certbot trust-plugin-with-root=ok
snap install certbot-dns-nginx
关联nginx目录 用于自动配置
ln -s /program/env/nginx-1.24.0/sbin/nginx /usr/bin/nginx
ln -s /program/env/nginx-1.24.0/conf/ /etc/nginx
申请指定域名证书
certbot --nginx -d mudwap.top
查看证书列表
certbot certificates
设置定时任务
0 */12 * * * certbot renew --quiet --no-self-upgrade --renew-hook 'nginx -s reload'
设置banner
vim /etc/motd
_ _
| ()
| | _ _ _ | | | '_ | | | \ \/ / | | | | | | || |> < ||_|| ||\,_/_/_\
用途:wap_mud server
qq群:123
启动mongo:mongod -f bin/mongodb.conf
启动jenkins:nohup java -jar /hhx/jenkins.war --httpPort=8990 >/123/service/log/jenkins.log 2>&1 & password:123
jenkins工作目录:/root/.jenkins/workspace/wap_mud
日志目录:/123/service/log/