$ sudo certbot --manual --preferred-challenges dns certonly
输入域名(多个域名需以逗号或空格分开)并同意记录本机IP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[root@MyPrecious ~]# certbot --manual --preferred-challenges dns certonly 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 Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel): *.opstrip.com,opstrip.com Obtaining a new certificate Performing the following challenges: dns-01 challenge for opstrip.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
后开始获取证书,会有类似以下提示:
1 2 3 4 5 6 7 8 9 10
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please deploy a DNS TXT record under the name _acme-challenge.opstrip.com with the following value: On6MxDvMMz-nRST-PAu3VHQoMQ2nuzYbvtA4Gw13EiM Before continuing, verify the record is deployed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Press Enter to Continue
Waiting for verification... Resetting dropped connection: acme-v02.api.letsencrypt.org Resetting dropped connection: acme-v02.api.letsencrypt.org 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/opstrip.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/opstrip.com/privkey.pem Your cert will expire on 2019-03-28. 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