Let's Encrypt 在Centos 7.6+Nginx环境下申请范解析证书--自动申请与部署更新

admin2年前Linux646

 Let's Encrypt 在Centos 7.6+Nginx环境下申请范解析证书--自动申请与部署更新

安装依赖

yum install -y socat

安装 acme

curl https://get.acme.sh | sh 或者 wget -O - https://get.acme.sh | sh


crontab -l

导入腾讯token

export DP_Id="###"

export DP_Key="####"


申请证书

/root/.acme.sh/acme.sh --issue --dns dns_dp -d example.com -d *.example.com





nginx 部署证书--以后会自动部署


acme.sh --installcert -d example.com  \


--key-file       /etc/letsencrypt/live/www.example.com/privkey.pem \


--fullchain-file /etc/letsencrypt/live/www.example.com/fullchain.pem \


--reloadcmd     "service nginx reload"


或者

acme.sh --installcert -d example.com  --key-file       /etc/letsencrypt/live/www.example.com/privkey.pem --fullchain-file /etc/letsencrypt/live/www.example.com/fullchain.pem --reloadcmd     "service nginx reload"


查看每天任务

crontab -l


手动强制更新证书

acme.sh --renew -d example.com --force


查看证书列表


acme.sh --list


停止 Renew


acme.sh --remove -d example.com

之后手动把目录下的证书移除就行。


参考文档:https://zhuanlan.zhihu.com/p/347064501

                 http://www.manongjc.com/detail/51-avncjkrokejmoty.html

上面两位作者


相关文章

使用pip进行Python包的安装方法以及pip install scrapy

首先,在cmd窗口中,用pip安装Python包,经常会出现超时的现象,主要是由于很多包都是需要从国外的网站上进行下载,所以会限速,但是如果采用国内的镜像进行下载,就会特别快,这里给出几个非常好用的方...

Centos 挂载云盘

查找fdisk -l格式化mkfs.ext4 /dev/vdb手动挂载mount /dev/vdb /data mount -a全自动挂载vi /etc/fstab/dev/vdb ...

linux搭建邮件服务器[转]

原地址:https://www.cnblogs.com/chris-cp/p/4843407.html一、概述:  在配置邮件服务器之前,先解释几个概念。  通常使用Email都很容易,但是Inter...

Hyper-v设置centos固定ip的方法

Hyper-v设置centos固定ip的方法

vi /etc/sysconfig/network-scripts/ifcfg-eth0TYPE="Ethernet" PROXY_METHOD="none"...

win10 hyper-v 虚拟机ping不通宿主机问题

win10 hyper-v 虚拟机ping不通宿主机问题

在Windows10  Hyper-V 中安装 Linux (Centos6.9)虚拟机无法 ping 通宿主机这种情况下关闭 Windows 防火墙就能ping通了,当然关闭防火墙不安全。...

生成linux公钥

 ssh-keygen...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。