{"id":1192,"date":"2020-12-08T15:45:07","date_gmt":"2020-12-08T06:45:07","guid":{"rendered":"https:\/\/darkgray.homelinux.com\/modules\/wpress\/?p=1192"},"modified":"2020-12-09T11:13:18","modified_gmt":"2020-12-09T02:13:18","slug":"certbot%e3%81%ae%e6%9b%b4%e6%96%b0%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/darkgray.homelinux.com\/blog\/?p=1192","title":{"rendered":"certbot\u306e\u66f4\u65b0\u8a2d\u5b9a"},"content":{"rendered":"\n<p>\u3000\u3053\u3053\u3000darkgray\u30b5\u30a4\u30c8\u3067\u306f\u3000\u30b5\u30a4\u30c8\u306e\u6697\u53f7\u5316\u306bcertbot\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3000certbot\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u3000\u7121\u6599\u3067\u304a\u624b\u8efd\uff08\uff1f\uff09\u306b\u3000\u6697\u53f7\u5316\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3067\u304d\u307e\u3059\u3002\u3000certbot\u306e\u8aac\u660e\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u7b49\u3005\u306f\u3000\u30b0\u30b0\u308c\u3070\u8272\u3005\u306a\u60c5\u5831\u304c\u51fa\u3066\u304f\u308b\u306e\u3067\u3000\u3053\u3053\u3067\u306f\u7701\u7565\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u4ee5\u524d\u306b<a rel=\"noreferrer noopener\" href=\"https:\/\/darkgray.homelinux.com\/modules\/wpress\/?p=1124\" target=\"_blank\">crontab\u3092\u4f7f\u7528\u3057\u3066\u66f4\u65b0\u3059\u308b\u65b9\u6cd5<\/a>\u3092\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u304c\u3001crontab\u3092\u4f7f\u7528\u3057\u3066\u81ea\u52d5\u66f4\u65b0\u3059\u308b\u65b9\u6cd5\u306f\u4f5c\u6cd5\u7684\u306b\u5b9c\u3057\u304f\u306a\u3044\u3088\u3046\u3067\u3000\u63a8\u5968\u65b9\u6cd5\u3092\u6539\u3081\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u3000\u6761\u4ef6\u306f\u3000Centos7\uff08\u6bd4\u8f03\u7684\u6700\u8fd1\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306eOS\uff09\u3067\u3000yum(\u6216\u3044\u306fdnf)\u3067\u3000certbot\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3000certbot\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306fepel\u7b49\u306e\u62e1\u5f35\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u5fc5\u8981\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3000\u81ea\u52d5\u66f4\u65b0\u8a2d\u5b9a\u3092\u3059\u308b\u524d\u306bPOST_HOOK\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u304a\u304d\u307e\u3059\u3002PRE_HOOK\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3000PRE_HOOK\u306e\u8a2d\u5b9a\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[]\u3000vi \/etc\/sysconfig\/certbot\n#\u3000\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u4e2d\u306ePOST_HOOK\u306e\u9805\u306b\u3000\n#\u3000\u8a3c\u660e\u66f8\u66f4\u65b0\u5f8c\u306b\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u306a\u30a2\u30d7\u30ea\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002\n\n# POST_HOOK=\"--post-hook 'systemctl restart httpd'\" \nPOST_HOOK=\"--post-hook 'systemctl restart httpd dovecot'\"<\/pre>\n\n\n\n<p>\u3000\u6b21\u306b\u3000certbot\u306e\u81ea\u52d5\u66f4\u65b0\u306e\u6a5f\u80fd\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[]# systemctl start certbot-renew.timer \n[]# systemctl enable certbot-renew.timer\nCreated symlink from \/etc\/systemd\/system\/timers.target.wants\/certbot-renew.timer to \/usr\/lib\/systemd\/system\/certbot-renew.timer.<\/pre>\n\n\n\n<p>\u3000\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3059\u3002certbot-renew.timer\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u3066\u3000\u8d77\u52d5\u6642\u9593\u304c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u3000\u3061\u3083\u3093\u3068\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[]# systemctl list-timers\nNEXT                        LEFT          LAST                       PASSED    UNIT                         ACTIVATES\n\u706b 2020-12-08 19:49:25 JST 4h 18min left \u706b 2020-12-08 04:10:20 JST 11h ago   certbot-renew.timer          certbot-renew.service\n\u6c34 2020-12-09 14:34:00 JST 23h left      \u706b 2020-12-08 14:34:00 JST 56min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service\n\n2 timers listed.\nPass --all to see loaded but inactive timers, too.<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u3053\u3053\u3000darkgray\u30b5\u30a4\u30c8\u3067\u306f\u3000\u30b5\u30a4\u30c8\u306e\u6697\u53f7\u5316\u306bcertbot\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3000certbot\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u3000\u7121\u6599\u3067\u304a\u624b\u8efd\uff08\uff1f\uff09\u306b\u3000\u6697\u53f7\u5316\u30b5\u30a4\u30c8\u3092\u904b\u7528\u3067\u304d\u307e\u3059\u3002\u3000certbot\u306e\u8aac\u660e\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u7b49\u3005\u306f\u3000\u30b0\u30b0\u308c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/darkgray.homelinux.com\/blog\/?p=1192\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;certbot\u306e\u66f4\u65b0\u8a2d\u5b9a&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[4,73,1],"tags":[],"class_list":["post-1192","post","type-post","status-publish","format-standard","hentry","category-centos7","category-certbot","category-1"],"_links":{"self":[{"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1192"}],"version-history":[{"count":4,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions"}],"predecessor-version":[{"id":1196,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions\/1196"}],"wp:attachment":[{"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darkgray.homelinux.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}