Certbot自签证书
参考文档:https://certbot.eff.org/docs/using.html#revoking-certificates
一、certbot-auto脚本部署(2020年底官方已经不支持这种方式部署)
本示例是以*.onap.vip为例进行证书创建
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto创建证书,配置dns解析,需要在域名解析中添加脚本执行过程中产生的主机记录和记录值做验证,填写邮箱是为了证书到期前10天发邮件通知
./certbot-auto --server https://acme-v02.api.letsencrypt.org/directory -d "onap.vip" -d "*.onap.vip" --manual --preferred-challenges dns-01 certonly
bash certbot-auto renew
如果提示未到期,cert not due for renewal,可以强制更新如下
bash certbot-auto certonly --manual -d onap.vip
或者使用此命令:bash certbot-auto certonly --standalone --no-self-upgrade -d onap.vip
看到以下信息表示成功了
证书上传到阿里云
1、获取证书链和私钥的信息
查看证书链
cat /etc/letsencrypt/live/onap.vip/fullchain.pem
查看私钥
cat /etc/letsencrypt/live/onap.vip/privkey.pem
2、把证书链和私钥上传到阿里云
3、如果需要转换证书格式可以参考以下命令
openssl x509 -in fullchain.pem -out fullchain.crt
openssl rsa -in privkey.pem -out privkey.key
4、查看证书到期时间
openssl x509 -in /etc/letsencrypt/live/onap.vip-0002/cert.pem -noout -dates
5、certbot卸载
rm -rf ./certbot-auto
rm -rf /opt/eff.org/
rm -rf /etc/letsencrypt/
如果有配置crontab也需要删除对应的crontab
二、通过snap(官方推荐)方式部署certbot(centos7.8)
1、安装snap
yum -y install epel-release
yum -y install yum-plugin-copr
yum copr enable ngompa/snapcore-el7
yum -y install snapd
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
#snap安装软件加速(可以不执行)
snap install snap-store
snap install snap-store-proxy
snap install snap-store-proxy-client
2、通过snap安装certbot
snap list|grep certbot ( 查看是否已经安装了certbot)
snap install --classic certbot(命令执行失败多尝试几次)
ln -s /snap/bin/certbot /usr/bin/certbot
3、通过certbot生成证书(以onap.vip为例)
下面第一张截图报错是由于顶级域名没有和生成证书的服务器做A解析
certbot --server https://acme-v02.api.letsencrypt.org/directory -d "onap.vip" -d "*.onap.vip" --manual --preferred-challenges dns-01 certonly
4、证书续订
certbot certonly --manual -d onap.vip
5、吊销证书
certbot revoke --cert-path /etc/letsencrypt/live/onap.vip/cert.pem
Certbot自签证书相关推荐
- 密码技术--证书及go语言生成自签证书
证书类似身份证,里面记录了某人的姓名.年龄.地址等个人信息,还包括这个人的公钥(身份证号码),并由认证机构(类似派出所)进行数字签名后发放,只要我们看到该证书就可以知道认证机构认定了该公钥(身份证号码 ...
- 使用Certbot配置SSL证书【ubuntu系统】
Step1:安装snapd[linux包管理工具] sudo apt install snapd #安装snapd sudo snap install core #安装core sudo snap r ...
- 使用certbot-auto脚本安装Certbot 生成https证书
在CentOS7上安装Certbot有三种方式: 使用Certbot官方提供的对应平台的RPM包安装 使用Certbot官方的提供的certbot-auto安装 使用pip安装Certbot,因为Ce ...
- certbot泛域名证书申请
前言 什么是Let's Encrypt? 目前世界上就只有为数不多的几家域名证书签发机构得到浏览器的认可,而Let's Encrypt 就是其中一家,并且你可以申请到免费的证书,当然你如果想要付费也行 ...
- https自签证书tls握手时错误或go系统错误处理
https自签证书tls握手时报错:2021/11/03 09:22:53 http: TLS handshake error from ip:port: remote error: tls: unk ...
- centos7搭建DNS服务,CA字签证书
1.描述TSL链路的通信图 第一阶段:client hello1:向服务端发送支持的协议版本,比如 tls1.22:客户端生成一个随机数,稍后用户生成"会话秘钥"3:发送支持的加密 ...
- freeswitch使用自签证书,配置WSS
Freeswitch使用自签证书 1. 使用SSL-TOOLS生成自签证书 (1) 下载ssl.ca-0.1.tar.gz [root@localhost ~]# wget http://files. ...
- 使用xca工具生成自签证书
本文使用 xca 生成自签证书. 概述 之前使用 openssl 生成证书,在 golang 中测试,发现客户端连接失败,经查发现是Subject Alternative Name不支持导致的.因虚拟 ...
- Certbot 生成 ssl 证书
certbot 是用来申请 Let's Encrypt 免费 SSL 证书一般的免费 SSL 证书,好像都是使用 Let's Encrypt 颁发的证书.官网地址:https://letsencryp ...
最新文章
- android7.1.2 user版本打开usb调试功能
- android11开启无线调试
- IE10、IE11解决不能播放Flash的问题!
- Confluence 6 SQL 异常的问题解决
- 毕设题目:Matlab优化分类
- 深入理解计算机系统第四版_技术干货 |深入理解计算机系统之链接
- vim 编辑二进制文件
- DELL Power Edge 1950 系统硬件用户手册
- MacOS安装Photoshop2022提示错误代码107(Error Code: 107)(更新)
- 基于STM32超声波测距
- 工单流转 指派 php,第三节 工单的指派和处理
- 51.cto我真的很难过
- C++包扩展_Netgear 网件 EAX80 AX6000规格 无线扩展器 开箱拆解评测
- 卡在装备配置计算机,win10开机卡logo的小伙伴有福了,赶紧看过来!
- 基本磁盘无法转化为动态磁盘,提示:此对象不支持操作
- 强制关机后进不了系统
- linux高性能服务器编程书本总结
- JAVA网络编程、正则表达式
- python nonlocal 的应用
- 关于cocos creator 2.0的废除cc.p接口Sorry, cc.p is deprecated. Please use cc.v2 instead