{"id":105,"date":"2018-04-28T12:47:06","date_gmt":"2018-04-28T03:47:06","guid":{"rendered":"https:\/\/0x0c.info\/?p=105"},"modified":"2018-04-28T12:47:06","modified_gmt":"2018-04-28T03:47:06","slug":"%e3%80%90centos7%e3%80%91-acme-tiny%e3%82%92yum%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%80%81lets-encrypt%e3%81%a7ssl%e8%a8%bc%e6%98%8e%e6%9b%b8%e3%82%92%e5%8f%96","status":"publish","type":"post","link":"https:\/\/0x0c.info\/?p=105","title":{"rendered":"\u3010CentOS7\u3011 acme-tiny\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001let&#8217;s encrypt\u3067SSL\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"<p>\t\t\t\tacme-tiny\u306fapache\u306e\u518d\u8d77\u52d5\u3068\u304b\u4f59\u8a08\u306a\u3053\u3068\u3092\u3057\u306a\u3044\u306e\u3067\u3001certbot\u3088\u308a\u4f7f\u3044\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u8a73\u3057\u304f\u306f <a href=\"https:\/\/github.com\/diafygi\/acme-tiny\">https:\/\/github.com\/diafygi\/acme-tiny<\/a> \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u8a8d\u8a3c\u3057\u305f\u3044\u30c9\u30e1\u30a4\u30f3\u540d\u304c 171220.0x0c.info \u3067\u3001http\u30b5\u30fc\u30d0\u306b apache 2.4.8\u4ee5\u964d\u3092\u7528\u3044\u308b\u5834\u5408\u3067\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>Step 1<\/h2>\n<p>\u3053\u306e\u3078\u3093\u306f\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u2193<\/p>\n<pre><code>yum install httpd mod_ssl\nyum install epel-release \nyum install acme-tiny\n<\/code><\/pre>\n<hr \/>\n<h2>Step 2<\/h2>\n<p>acme-tiny\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068 <code>\/etc\/httpd\/conf.d\/acme.conf<\/code> \u3068 <code>\/var\/www\/challenges\/<\/code> \u304c\u3067\u304d\u308b\u306e\u3067\u3001apache\u3092\u30ea\u30ed\u30fc\u30c9\u3059\u308b\u306a\u308a\u3053\u3053\u304b\u3089\u8d77\u52d5\u3059\u308b\u306a\u308a\u3057\u307e\u3059\u3002<\/p>\n<pre><code>service httpd start\n<\/code><\/pre>\n<hr \/>\n<h2>Step 3<\/h2>\n<p>\u30a2\u30ab\u30a6\u30f3\u30c8\u30ad\u30fc\u4f5c\u6210<\/p>\n<pre><code>openssl genrsa 4096 &gt; \/var\/lib\/acme\/private\/account.key\n<\/code><\/pre>\n<hr \/>\n<h2>Step 4<\/h2>\n<p>\u30c9\u30e1\u30a4\u30f3\u7528\u306e\u79d8\u5bc6\u30ad\u30fc\u4f5c\u6210<\/p>\n<pre><code>openssl genrsa 4096 &gt; \/var\/lib\/acme\/private\/171220.0x0c.info.key\n<\/code><\/pre>\n<hr \/>\n<h2>Step 5<\/h2>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8\u4f5c\u6210<\/p>\n<pre><code>openssl req -new -sha256 -key \/var\/lib\/acme\/private\/171220.0x0c.info.key -subj \"\/CN=171220.0x0c.info\" &gt; \/var\/lib\/acme\/csr\/171220.0x0c.info.csr\n<\/code><\/pre>\n<hr \/>\n<h2>Step 6<\/h2>\n<p>let&#8217;s encrypt\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b<\/p>\n<pre><code>\/usr\/sbin\/acme_tiny --chain --account-key \/var\/lib\/acme\/private\/account.key --csr \/var\/lib\/acme\/csr\/171220.0x0c.info.csr --acme-dir \/var\/www\/challenges\/ &gt; \/var\/lib\/acme\/certs\/171220.0x0c.info.crt\n<\/code><\/pre>\n<hr \/>\n<h2>Step 7<\/h2>\n<p>\u3067\u304d\u3042\u304c\u3063\u305f\u8a3c\u660e\u66f8\u3068\u79d8\u5bc6\u9375\u3092\u30b3\u30d4\u30fc\u3057\u3066apache\u3092\u30ea\u30ed\u30fc\u30c9\u3002<br \/>\n\u3053\u306e\u3042\u305f\u308a\u3082\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code>cp \/var\/lib\/acme\/private\/171220.0x0c.info.key \/etc\/pki\/tls\/private\/localhost.key\ncp \/var\/lib\/acme\/certs\/171220.0x0c.info.crt \/etc\/pki\/tls\/certs\/localhost.crt\nservice httpd reload\n<\/code><\/pre>\n<hr \/>\n<h2>Step 8<\/h2>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u3001\u4e00\u30f6\u6708\u306b\u4e00\u56decron\u3067\u56de\u3059\u3002<\/p>\n<pre><code>#!\/bin\/sh\n\/usr\/sbin\/acme_tiny --chain --account-key \/var\/lib\/acme\/private\/account.key --csr \/var\/lib\/acme\/csr\/171220.0x0c.info.csr --acme-dir \/var\/www\/challenges\/ &gt; \/var\/lib\/acme\/certs\/171220.0x0c.info.crt || exit\ncp \/var\/lib\/acme\/certs\/171220.0x0c.info.crt \/etc\/pki\/tls\/certs\/localhost.crt\n\/usr\/sbin\/service httpd reload\n<\/code><\/pre>\n<hr \/>\n<h2>\u304a\u307e\u3051:nginx\u306e\u5834\u5408<\/h2>\n<p>\u4e0a\u8a18Step 5\u3068Step 6\u306e\u9593\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bnginx\u3092\u8a2d\u5b9a\u3057\u3001\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre><code>server {\n        listen 80 default_server;\n<\/code><\/pre>\n<p>\u306e\u4e0b\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre><code>        #for acme-tiny\n        location \/.well-known\/acme-challenge\/ {\n            alias \/var\/www\/challenges\/;\n            try_files $uri =404;\n        }\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>acme-tiny\u306fapache\u306e\u518d\u8d77\u52d5\u3068\u304b\u4f59\u8a08\u306a\u3053\u3068\u3092\u3057\u306a\u3044\u306e\u3067\u3001certbot\u3088\u308a\u4f7f\u3044\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f https:\/\/github.com\/diafygi\/acme-tiny \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002 \u8a8d\u8a3c\u3057\u305f\u3044\u30c9\u30e1\u30a4\u30f3\u540d\u304c 171220.0x0c.info \u3067\u3001http\u30b5\u30fc\u30d0\u306b apache 2.4.8\u4ee5\u964d\u3092\u7528\u3044\u308b\u5834\u5408\u3067\u8aac\u660e\u3057\u307e\u3059\u3002 Step 1 \u3053\u306e\u3078\u3093\u306f\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u2193 yum install httpd mod_ssl yum install epel-release yum install acme-tiny Step 2 acme-tiny\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068 \/etc\/httpd\/conf.d\/acme.conf \u3068 \/var\/www\/challenges\/ \u304c\u3067\u304d\u308b\u306e\u3067\u3001apache\u3092\u30ea\u30ed\u30fc\u30c9\u3059\u308b\u306a\u308a\u3053\u3053\u304b\u3089\u8d77\u52d5\u3059\u308b\u306a\u308a\u3057\u307e\u3059\u3002 service httpd start Step 3 \u30a2\u30ab\u30a6\u30f3\u30c8\u30ad\u30fc\u4f5c\u6210 openssl genrsa 4096 &gt; \/var\/lib\/acme\/private\/account.key Step 4 \u30c9\u30e1\u30a4\u30f3\u7528\u306e\u79d8\u5bc6\u30ad\u30fc\u4f5c\u6210 openssl genrsa 4096 &gt; \/var\/lib\/acme\/private\/171220.0x0c.info.key Step 5 \u30ea\u30af\u30a8\u30b9\u30c8\u4f5c\u6210 openssl req -new -sha256 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/0x0c.info\/?p=105\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u3010CentOS7\u3011 acme-tiny\u3092yum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001let&#8217;s encrypt\u3067SSL\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3059\u308b&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[10,14,21,46,47,54,85],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-linux","tag-acme-tiny","tag-apache","tag-centos7","tag-lets-encrypt","tag-linux","tag-nginx","tag-yum"],"_links":{"self":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":0,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"wp:attachment":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}