{"id":50,"date":"2021-03-26T09:10:00","date_gmt":"2021-03-26T01:10:00","guid":{"rendered":"https:\/\/www.johntitorblog.com\/?p=50"},"modified":"2021-03-26T09:10:00","modified_gmt":"2021-03-26T01:10:00","slug":"kangle%e4%bd%bf%e7%94%a8lets-encrypt%e5%85%8d%e8%b4%b9ssl%e8%af%81%e4%b9%a6%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.johntitorblog.com\/?p=50","title":{"rendered":"Kangle\u4f7f\u7528Let\u2019s Encrypt\u514d\u8d39SSL\u8bc1\u4e66\u6559\u7a0b"},"content":{"rendered":"\n<p class=\"has-extra-small-font-size\">\u5b89\u88c5\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u5982\u679c\u662fCentOS 6\uff0c\u5148\u6267\u884c\uff1ayum install epel-release<\/p>\n\n\n\n<pre class=\"wp-block-code has-extra-small-font-size\"><code>cd \/root\/<br>wget https:\/\/dl.eff.org\/certbot-auto \u2013no-check-certificate<br>chmod +x .\/certbot-auto<br>.\/certbot-auto -n<\/code><\/pre>\n\n\n\n<p class=\"has-extra-small-font-size\">\u63a5\u4e0b\u6765\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002<br>\u5355\u57df\u540d\u751f\u6210\u8bc1\u4e66\uff1a<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\"><code>.\/certbot-auto certonly --email 123@163.com --agree-tos --webroot -w \/home\/wwwroot\/sspanel.tabboa.com -d sspanel.tabboa.com<\/code><\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u63d0\u793a<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">IMPORTANT NOTES:<br>\u2013 Congratulations! Your certificate and chain have been saved at<br>\/etc\/letsencrypt\/live\/sspanel.tabboa.com\/fullchain.pem. Your cert will<br>expire on 2016-10-01. To obtain a new or tweaked version of this<br>certificate in the future, simply run certbot-auto again. To<br>non-interactively renew <em>all<\/em> of your certificates, run<br>\u201ccertbot-auto renew\u201d<br>\u2013 If you like Certbot, please consider supporting our work by:<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">Donating to ISRG \/ Let\u2019s Encrypt: https:\/\/letsencrypt.org\/donate<br>Donating to EFF: https:\/\/eff.org\/donate-le<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u5c31\u662f\u751f\u6210\u6210\u529f\u3002<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u751f\u6210\u7684\u8bc1\u4e66\u4f1a\u5b58\u5728\uff1a<code>\/etc\/letsencrypt\/live\/sspanel.tabboa.com\/<\/code> \u76ee\u5f55\u4e0b<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u63a5\u4e0b\u6765\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u591a\u57df\u540d\u751f\u6210\u8bc1\u4e66\uff1a<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\"><code>.\/certbot-auto certonly --email xxx@gmail.com --agree-tos --no-eff-email --webroot -w \/home\/ftp\/p\/ps5\/wwwroot\/ -d example.com -d www.example.com<\/code><\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u6bcf5\u5929\u7eed\u671f\u547d\u4ee4<br><code>echo \"0 3 *\/5 * * root \/root\/certbot-auto renew > \/root\/renew.log 2>&amp;1\" >> \/etc\/crontab<br>service crond restart<br>cat \/etc\/crontab<\/code><\/p>\n\n\n\n<p class=\"has-extra-small-font-size\"><strong>easypanel\u8bbe\u7f6e\u90e8\u5206\uff1a<\/strong><br>\u5f00\u901a\u7f51\u7ad9\u65f6\u7aef\u53e3\u519980,443s\u3010\u5047\u5982\u662f\u5df2\u7ecf\u521b\u5efa\u4e86\u7684\uff0c\u5c31\u70b9\u51fb\u6240\u6709\u7f51\u7ad9\uff0c\u7136\u540e\u70b9\u51fb\u4fee\u6539\uff0c\u9ad8\u7ea7\u9009\u9879\uff0c\u7aef\u53e3\u90a3\u91cc\u586b80,443s \u5373\u53ef\u3011\uff0c\u7136\u540e\u70b9\u51fb\u7f51\u7ad9\u540d\u79f0\u5230\u8be5\u865a\u62df\u4e3b\u673a\u540e\u53f0\uff0c\u5c31\u80fd\u770b\u5230SSL\u8bc1\u4e66\u9009\u9879\u4e86\uff0cssl\u8bc1\u4e66\u5185\u5bb9\u90a3\u4e2a\u6846\u590d\u5236\/etc\/letsencrypt\/live\/sspanel.tabboa.com\/fullchain.pem\u91cc\u9762\u7684\u5185\u5bb9\uff0cssl\u8bc1\u4e66\u5bc6\u94a5\u5185\u5bb9\u90a3\u4e2a\u6846\u590d\u5236\/etc\/letsencrypt\/live\/sspanel.tabboa.com\/privkey.pem\u91cc\u9762\u7684\u5185\u5bb9\uff0c\u7136\u540e\u70b9\u51fb\u63d0\u4ea4\uff0c\u72b6\u6001\u6210\u529f\u8868\u793a\u6ca1\u95ee\u9898\uff0c\u8981http\u8bbf\u95ee\u81ea\u52a8\u8df3\u8f6c\u5230https\uff0c\u62ff\u4f2a\u9759\u6001301\u5f3a\u5236\u8df3\u8f6c\u5230https\u5373\u53ef\u3002<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u8865\u5145\uff1a\u4f7f\u7528 \u8f6f\u8fde\u63a5 \u6765\u8fde\u63a5\u5bc6\u94a5<br>easypanel SSL\u5f00\u542f\u4e4b\u540e\u4f1a\u751f\u6210 ssl.crt\u3010\/home\/ftp\/s\/sspanel\/ssl.crt\u3011 \u548c ssl.key\u3010\/home\/ftp\/s\/sspanel\/ssl.key \u3011 \u4e24\u4e2a\u6587\u4ef6\uff0c\u53ef\u4ee5\u901a\u5173\u8f6f\u8fde\u63a5\u8fde\u63a5\u5230lets encrypt\u751f\u6210\u7684\u8bc1\u4e66\u8def\u5f84\uff0c\u4ee5\u540erenew\u5c31\u4e0d\u7528\u518d\u64cd\u4f5ceasypanel\u4e86<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u9996\u5148\u5220\u9664\u7f51\u7ad9\u76ee\u5f55\u4e0b\u7684 ssl.crt \u548c ssl.key \u7136\u540e\u4f7f\u7528\u547d\u4ee4<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\"><code>ln -s \/etc\/letsencrypt\/live\/sspanel.tabboa.com\/fullchain.pem \/home\/ftp\/s\/sspanel\/ssl.crt<br>ln -s \/etc\/letsencrypt\/live\/sspanel.tabboa.com\/privkey.pem \/home\/ftp\/s\/sspanel\/ssl.key<\/code><\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u7136\u540e\u67e5\u770beasypanel\u4e0a\u7684 SSL \u72b6\u6001\uff0c\u5982\u679c\u4e3a\u5931\u8d25\u5219\u70b9\u51fb\u4e00\u4e0b\u63d0\u4ea4\u5c31\u53ef\u4ee5\u4e86<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u7279\u522b\u63d0\u793a\uff0c\u8981\u662f\u6267\u884c\u547d\u4ee4\/root\/certbot-auto renew \u5ef6\u671f\u8bc1\u4e66\u7684\u65f6\u5019\u51fa\u73b0\u5982\u4e0b\u9519\u8bef<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">Traceback (most recent call last):<br>File &#8220;\/usr\/bin\/virtualenv&#8221;, line 2, in<br>import virtualenv<br>ImportError: No module named virtualenv<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\">\u5c31\u6267\u884c\u4e00\u4e0b\u4ee3\u7801\u5373\u53ef\u4fee\u590d<\/p>\n\n\n\n<p class=\"has-extra-small-font-size\"><code>curl https:\/\/bootstrap.pypa.io\/get-pip.py | python<br>pip install virtualenv<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u65b9\u6cd5\uff1a \u5982\u679c\u662fCentOS 6\uff0c\u5148\u6267\u884c\uff1ayum install epel-release \u63a5\u4e0b\u6765\u5c31\u4f1a\u81ea\u52a8\u5b89 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=50"}],"version-history":[{"count":0,"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johntitorblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}