Let's Encrypt 通配符域名证书申请

2019-02-19  本文已影响0人  003003

安装证书工具

# yum -y install epel-release
# yum -y install yum-utils
# yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
# yum install python2-certbot-nginx

生成证书

# certbot certonly -d *.abc.com --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --agree-tos
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for abc.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.

Are you OK with your IP being logged?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name    
_acme-challenge.abc.com with the following value:

_51FGla4onVpSBp89QgAS7NOfzlQMxXTKh14IOVbaQ7

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

需要添加域名解析txt记录,添加成功后回车即可
主机记录 _acme-challenge
记录值 _51FGla4onVpSBp89QgAS7NOfzlQMxXTKh14IOVbaQ7

Please deploy a DNS TXT record under the name    
_acme-challenge.abc.com with the following value:

_51FGla4onVpSBp89QgAS7NOfzlQMxXTKh14IOVbaQ7

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
Waiting for verification...
Cleaning up challenges
Resetting dropped connection: acme-v02.api.letsencrypt.org

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/abc.com-0002/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/abc.com-0002/privkey.pem
   Your cert will expire on 2019-05-20. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

证书申请成功,路径 /etc/letsencrypt/live/abc.com-0002

上一篇下一篇

猜你喜欢

热点阅读