{"id":6,"date":"2021-12-31T20:18:55","date_gmt":"2021-12-31T11:18:55","guid":{"rendered":"https:\/\/www.ichikun.work\/?p=6"},"modified":"2022-01-23T14:30:07","modified_gmt":"2022-01-23T05:30:07","slug":"%e3%80%902021%e5%b9%b4%e3%80%91%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4%e3%81%abwordpress%e3%82%92%e5%b0%8e%e5%85%a5%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ichikun.work\/?p=6","title":{"rendered":"\u30102021\u5e74\u3011\u30e9\u30ba\u30d1\u30a4\u306bWordPress\u3092\u5c0e\u5165\u3059\u308b"},"content":{"rendered":"\n<p>WordPress\u306f\u30d6\u30ed\u30b0\u7528\u3068\u3057\u3066\u3082\u30b7\u30a7\u30a2\u304c\u591a\u3044\u3067\u3059\u304c\uff0c\u81ea\u5b85\u30b5\u30fc\u30d0\u3067\u904b\u7528\u3059\u308b\u306a\u3089PC\u304b\u3089\u8abf\u9054\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u57fa\u76e4\u3068\u306a\u308bPC\u306f\u4f7f\u308f\u306a\u304f\u306a\u3063\u305fPC\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001PC\u304c\u306a\u3051\u308c\u3070\u5c11\u3057\u3067\u3082\u5b89\u304f\u624b\u306b\u5165\u308c\u305f\u3044\u3082\u306e\u3067\u3059\u3002<br>\u305d\u3053\u3067\u3001\u30b5\u30d0\u304f\u3093\u306b\u4f55\u304c\u3044\u3044\u306e\u304b\u805e\u3044\u3066\u307f\u305f\u3089\u30e9\u30ba\u30d1\u30a4(<meta charset=\"utf-8\"><a href=\"https:\/\/hb.afl.rakuten.co.jp\/ichiba\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?pc=https%3A%2F%2Fitem.rakuten.co.jp%2Fbiccamera%2F4589733080672%2F&amp;link_type=hybrid_url&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJoeWJyaWRfdXJsIiwic2l6ZSI6IjI0MHgyNDAiLCJuYW0iOjEsIm5hbXAiOiJyaWdodCIsImNvbSI6MSwiY29tcCI6ImRvd24iLCJwcmljZSI6MSwiYm9yIjoxLCJjb2wiOjEsImJidG4iOjEsInByb2QiOjAsImFtcCI6ZmFsc2V9\">Raspberry Pi<\/a>)\u304c\u826f\u3044\u3068\u306e\u6559\u3048\u3066\u304f\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody><tr><td><div style=\"border:1px solid #95a5a6;border-radius:.75rem;background-color:#FFFFFF;width:504px;margin:0px;padding:5px;text-align:center;overflow:hidden;\"><table><tbody><tr><td style=\"width:240px\"><a href=\"https:\/\/hb.afl.rakuten.co.jp\/ichiba\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?pc=https%3A%2F%2Fitem.rakuten.co.jp%2Fbiccamera%2F4589733080672%2F&amp;link_type=picttext&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJwaWN0dGV4dCIsInNpemUiOiIyNDB4MjQwIiwibmFtIjoxLCJuYW1wIjoicmlnaHQiLCJjb20iOjEsImNvbXAiOiJkb3duIiwicHJpY2UiOjEsImJvciI6MSwiY29sIjoxLCJiYnRuIjoxLCJwcm9kIjowLCJhbXAiOmZhbHNlfQ%3D%3D\" target=\"_blank\" rel=\"nofollow sponsored noopener\" style=\"word-wrap:break-word;\"><img decoding=\"async\" src=\"https:\/\/hbb.afl.rakuten.co.jp\/hgb\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?me_id=1269553&amp;item_id=12130016&amp;pc=https%3A%2F%2Fthumbnail.image.rakuten.co.jp%2F%400_mall%2Fbiccamera%2Fcabinet%2Fproduct%2F3370%2F00000005241564_a01.jpg%3F_ex%3D240x240&amp;s=240x240&amp;t=picttext\" border=\"0\" style=\"margin:2px\" alt=\"[\u5546\u54c1\u4fa1\u683c\u306b\u95a2\u3057\u307e\u3057\u3066\u306f\u3001\u30ea\u30f3\u30af\u304c\u4f5c\u6210\u3055\u308c\u305f\u6642\u70b9\u3068\u73fe\u6642\u70b9\u3067\u60c5\u5831\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u304c\u3054\u3056\u3044\u307e\u3059\u3002]\" title=\"[\u5546\u54c1\u4fa1\u683c\u306b\u95a2\u3057\u307e\u3057\u3066\u306f\u3001\u30ea\u30f3\u30af\u304c\u4f5c\u6210\u3055\u308c\u305f\u6642\u70b9\u3068\u73fe\u6642\u70b9\u3067\u60c5\u5831\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u304c\u3054\u3056\u3044\u307e\u3059\u3002]\"><\/a><\/td><td style=\"vertical-align:top;width:248px;\"><p style=\"font-size:12px;line-height:1.4em;text-align:left;margin:0px;padding:2px 6px;word-wrap:break-word\"><a href=\"https:\/\/hb.afl.rakuten.co.jp\/ichiba\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?pc=https%3A%2F%2Fitem.rakuten.co.jp%2Fbiccamera%2F4589733080672%2F&amp;link_type=picttext&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJwaWN0dGV4dCIsInNpemUiOiIyNDB4MjQwIiwibmFtIjoxLCJuYW1wIjoicmlnaHQiLCJjb20iOjEsImNvbXAiOiJkb3duIiwicHJpY2UiOjEsImJvciI6MSwiY29sIjoxLCJiYnRuIjoxLCJwcm9kIjowLCJhbXAiOmZhbHNlfQ%3D%3D\" target=\"_blank\" rel=\"nofollow sponsored noopener\" style=\"word-wrap:break-word;\">KSY\u3000\u30b1\u30a4\u30a8\u30b9\u30ef\u30a4 Raspberry Pi 3 Model B \u30d5\u30eb\u30ad\u30c3\u30c8 RASST3BFUL0162<\/a><br><span>\u4fa1\u683c\uff1a14520\u5186\uff08\u7a0e\u8fbc\u3001\u9001\u6599\u5225)<\/span> <span style=\"color:#BBB\">(2021\/12\/31\u6642\u70b9)<\/span><\/p><div style=\"margin:10px;\"><a href=\"https:\/\/hb.afl.rakuten.co.jp\/ichiba\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?pc=https%3A%2F%2Fitem.rakuten.co.jp%2Fbiccamera%2F4589733080672%2F&amp;link_type=picttext&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJwaWN0dGV4dCIsInNpemUiOiIyNDB4MjQwIiwibmFtIjoxLCJuYW1wIjoicmlnaHQiLCJjb20iOjEsImNvbXAiOiJkb3duIiwicHJpY2UiOjEsImJvciI6MSwiY29sIjoxLCJiYnRuIjoxLCJwcm9kIjowLCJhbXAiOmZhbHNlfQ%3D%3D\" target=\"_blank\" rel=\"nofollow sponsored noopener\" style=\"word-wrap:break-word;\"><img decoding=\"async\" src=\"https:\/\/static.affiliate.rakuten.co.jp\/makelink\/rl.svg\" style=\"float:left;max-height:27px;width:auto;margin-top:0\"><\/a><a href=\"https:\/\/hb.afl.rakuten.co.jp\/ichiba\/1feba0d1.7de5d8c8.1feba0d2.bad7b1c9\/?pc=https%3A%2F%2Fitem.rakuten.co.jp%2Fbiccamera%2F4589733080672%2F%3Fscid%3Daf_pc_bbtn&amp;link_type=picttext&amp;ut=eyJwYWdlIjoiaXRlbSIsInR5cGUiOiJwaWN0dGV4dCIsInNpemUiOiIyNDB4MjQwIiwibmFtIjoxLCJuYW1wIjoicmlnaHQiLCJjb20iOjEsImNvbXAiOiJkb3duIiwicHJpY2UiOjEsImJvciI6MSwiY29sIjoxLCJiYnRuIjoxLCJwcm9kIjowLCJhbXAiOmZhbHNlfQ==\" target=\"_blank\" rel=\"nofollow sponsored noopener\" style=\"word-wrap:break-word;\"><div style=\"float:right;width:41%;height:27px;background-color:#bf0000;color:#fff!important;font-size:12px;font-weight:500;line-height:27px;margin-left:1px;padding: 0 12px;border-radius:16px;cursor:pointer;text-align:center;\">\u697d\u5929\u3067\u8cfc\u5165<\/div><\/a><\/div><\/td><\/tr><\/tbody><\/table><\/div><br><p style=\"color:#000000;font-size:12px;line-height:1.4em;margin:5px;word-wrap:break-word\"><\/p><\/td><\/tr><\/tbody><\/table>\n\n\n\n<div class=\"wp-block-liquid-speech-balloon liquid-speech-balloon-wrap liquid-speech-balloon-00\"><div class=\"liquid-speech-balloon-avatar\"><\/div><div class=\"liquid-speech-balloon-text\"><p>\u305d\u3046\u3044\u3048\u3070\u81ea\u5b85\u30b5\u30fc\u30d0\u306bWordPress\u3092\u5c0e\u5165\u3057\u305f\u3044\u3093\u3060\u3051\u3069\u3001\u3044\u3044\u3082\u306e\u306a\u3044\u304b\u306a\uff1f\uff1f<\/p><div class=\"liquid-speech-balloon-arrow\"><\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-liquid-speech-balloon liquid-speech-balloon-wrap liquid-speech-balloon-01 liquid-speech-balloon-right\"><div class=\"liquid-speech-balloon-avatar\"><\/div><div class=\"liquid-speech-balloon-text\"><p>\u305d\u308c\u306a\u3089\u30e9\u30ba\u30d1\u30a4\u304c\u3044\u3044\u3088\uff01<br>\u3044\u3089\u306a\u3044PC\u306b\u7121\u6599\u306eOS\u5165\u308c\u3066\u3082\u3044\u3044\u3051\u3069\u3001\u30e9\u30ba\u30d1\u30a4\u306e\u7b50\u4f53(PC)\u3068OS\u304c\u3064\u3044\u3066\u308b\u304b\u3089\u521d\u5fc3\u8005\u306a\u3089\u4f7f\u3044\u3084\u3059\u3044\u3068\u601d\u3046\u3088\uff01<\/p><div class=\"liquid-speech-balloon-arrow\"><\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-liquid-speech-balloon liquid-speech-balloon-wrap liquid-speech-balloon-00\"><div class=\"liquid-speech-balloon-avatar\"><\/div><div class=\"liquid-speech-balloon-text\"><p>\u3058\u3083\u3042\u4eca\u56de\u306f\u30e9\u30ba\u30d1\u30a4\u3067\u69cb\u7bc9\u3057\u3066\u307f\u308b\u304b\u306a\uff01<\/p><div class=\"liquid-speech-balloon-arrow\"><\/div><\/div><\/div>\n\n\n\n<p>\u30b5\u30d0\u304f\u3093\u304c\u30e9\u30ba\u30d1\u30a4(Raspberry Pi)\u3092\u63a8\u3057\u3066\u304f\u308c\u305f\u305f\u3081\u3001\u30e9\u30ba\u30d1\u30a4\u306eWordPress\u5c0e\u5165\u307e\u3067\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div id=\"toc_container\" class=\"toc_light_blue no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#1\">1.\u30b9\u30da\u30c3\u30af<\/a><\/li><li><a href=\"#2\">2.\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><ul><li><a href=\"#2-1\">2-1.\u30b7\u30b9\u30c6\u30e0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/a><\/li><li><a href=\"#2-2apache_web\">2-2.apache web\u30b5\u30fc\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li><a href=\"#2-3GPG\">2-3.GPG\u30ad\u30fc\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u4fdd\u5b58\u3068\u8ffd\u52a0<\/a><\/li><li><a href=\"#2-4PHP74\">2-4.PHP7.4\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u5fc5\u8981\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li><a href=\"#2-5Apache\">2-5.Apache\u306e\u8a2d\u5b9a<\/a><\/li><li><a href=\"#2-6_MariaDB\">2-6. MariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a<\/a><\/li><li><a href=\"#2-7WordPress\">2-7.WordPress\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li><a href=\"#2-8\">2-8.\u30eb\u30fc\u30bf\u8a2d\u5b9a<\/a><\/li><li><a href=\"#2-9SSL\">2-9.SSL\u8a2d\u5b9a<\/a><\/li><\/ul><\/li><li><a href=\"#3\">3.\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"1\">1.\u30b9\u30da\u30c3\u30af<\/span><\/h2>\n\n\n\n<p>\u4eca\u56de\u5229\u7528\u3057\u305f\u30e9\u30ba\u30d1\u30a4\u306e\u30b9\u30da\u30c3\u30af\u306f\u4e0b\u8a18\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"padding: 10px; margin-bottom: 10px; border: 1px dotted #333333;\">\n\u30fb\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3000\u3000\u3000\u3000\u3000\u3000\u3000    Raspberry Pi3<br>\n\u30fbDistributor ID:\tRaspbian<br>\n\u30fbDescription:\tRaspbian GNU\/Linux 9.13 (stretch)<br>\n\u30fbRelease:\t9.13<br>\n\u30fbCodename:\tstretch <br>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4eca\u56de\u5c0e\u5165\u3059\u308b\u3082\u306e\u306f\u4e0b\u8a18\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"padding: 10px; margin-bottom: 10px; border: 1px dotted #333333;\">\n\u30fbApache web\u30b5\u30fc\u30d0<br> \n\u30fbMariaDB<br> \n\u30fbPHP<br> \n\u30fbWordPress<br> \n\u30fbLet&#8217;s Encrypt<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"2\">2.\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h2>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u30e9\u30ba\u30d1\u30a4\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059<br>\u53c2\u8003\u5143\u306f<a href=\"https:\/\/www.ingenious.jp\/articles\/howto\/raspberry-pi-howto\/wordpress-server-setup\/\">\u3053\u3061\u3089<\/a>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-1\"><meta charset=\"utf-8\">2-1.\u30b7\u30b9\u30c6\u30e0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/span><\/h3>\n\n\n\n<p>\u307e\u305a\u306f\u30b7\u30b9\u30c6\u30e0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3059\u3067\u306b\u30e9\u30ba\u30d1\u30a4\u306b\u69d8\u3005\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3044\u308c\u3070\u3001\u4f9d\u5b58\u95a2\u4fc2\u304c\u5d29\u308c\u3066\u52d5\u304b\u306a\u304f\u306a\u308b\u6050\u308c\u304c\u3042\u308b\u305f\u3081\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u884c\u308f\u306a\u304f\u3066\u3082\u826f\u3044\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u4f55\u3082\u5165\u3063\u3066\u3044\u306a\u3044\u305f\u3081\u7d20\u76f4\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt update -y\n$ sudo apt upgrade -y\n$ sudo reboot<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-2apache_web\">2-2.apache web\u30b5\u30fc\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h3>\n\n\n\n<p>\u3064\u304e\u306bweb\u30da\u30fc\u30b8\u3092\u69cb\u7bc9\u3059\u308bweb\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install apache2 -y<\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ apache2 -v\nServer version: Apache\/2.4.25 (Raspbian)\nServer built:   2021-10-02T13:27:55<\/code><\/pre>\n\n\n\n<p>\u3042\u308f\u305b\u3066\u3001web\u30b5\u30fc\u30d0\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$sudo apt install lsb-release apt-transport-https ca-certificates -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-3GPG\">2-3.GPG\u30ad\u30fc\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u4fdd\u5b58\u3068\u8ffd\u52a0<\/span><\/h3>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d\u306b\u691c\u8a3c\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001\u691c\u8a3c\u30c4\u30fc\u30eb\u306eGPK\u30ad\u30fc\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u3001\u4fdd\u5b58\u30fb\u8ffd\u52a0\u3092\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo wget -O \/etc\/apt\/trusted.gpg.d\/php.gpg https:\/\/packages.sury.org\/php\/apt.gpg\n$ echo \"deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main\" | sudo tee \/etc\/apt\/sources.list.d\/php.list<\/code><\/pre>\n\n\n\n<p>\u30c4\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u305f\u3081\u3001\u300c\u304a\u307e\u3058\u306a\u3044\u300d\u306e\u30b7\u30b9\u30c6\u30e0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u5b9f\u65bd\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt update -y\n$ sudo apt upgrade -y\n$ sudo reboot<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-4PHP74\">2-4.PHP7.4\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u5fc5\u8981\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h3>\n\n\n\n<p>WordPress\u306fPHP\u3067\u7a3c\u50cd\u3059\u308b\u305f\u3081\u3001PHP7.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install php7.4 -y<\/code><\/pre>\n\n\n\n<p>\u5b8c\u4e86\u3057\u305f\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d\u3092\u884c\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ php -v\nPHP 7.4.26 (cli) (built: Nov 22 2021 09:47:48) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0, Copyright (c) Zend Technologies\nwith Zend OPcache v7.4.26, Copyright (c), by Zend Technologies<\/code><\/pre>\n\n\n\n<p>\u6700\u5f8c\u306bWordPres\u306b\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install php7.4-curl php7.4-json php7.4-mbstring php7.4-mysql php7.4-imagick php7.4-xml php7.4-zi -y\n$ sudo apt install php7.4-fpm -y<\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo vi \/etc\/php\/7.4\/apache2\/php.ini\n\n&#091;mbstring] \n; language for internal character representation.\n ; This affects mb_send_mail() and mbstring.detect_order. \n; http:\/\/php.net\/mbstring.language \nmbstring.language = Japanese   ;\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u89e3\u9664 \n\uff5e\uff08\u7565\uff09\uff5e \nmemory_limit = 128M\n;\u4e0b\u8a18\u8ffd\u52a0 \npost_max_size = 40M \nupload_max_filesize = 30M<\/code><\/pre>\n\n\n\n<p>\u6b21\u306b\u63a5\u7d9a\u78ba\u8a8d\u3092\u3059\u308b\u305f\u3081\u306b\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$sudo vi \/var\/www\/html\/test.php\n&lt;?php\n        \t\tphpinfo();\n?&gt;\n<\/code><\/pre>\n\n\n\n<p>\u3059\u3079\u3066\u5b8c\u4e86\u3057\u305f\u3089\u4f5c\u696dPC\u304b\u3089\u30e9\u30ba\u30d1\u30a4\u306eIP\u3092\u6307\u5b9a\u3057\u3066apache\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30da\u30fc\u30b8\u304c\u8868\u793a\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"1024\" src=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-817x1024.png\" alt=\"\" data-id=\"36\" data-full-url=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40.png\" data-link=\"https:\/\/www.ichikun.work\/?attachment_id=36\" class=\"wp-image-36\" srcset=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-817x1024.png 817w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-239x300.png 239w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-768x963.png 768w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-1226x1536.png 1226w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40-1568x1965.png 1568w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-11.36.40.png 1634w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-5Apache\">2-5.Apache\u306e\u8a2d\u5b9a<\/span><\/h3>\n\n\n\n<p>\u30b5\u30fc\u30d0\u3068\u30c9\u30e1\u30a4\u30f3\u3092\u7d10\u4ed8\u3051\u305f\u308a\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8(web\u30da\u30fc\u30b8\u3092\u63a5\u7d9a\u3057\u305f\u3068\u304d\u306b\u6700\u521d\u306b\u5230\u9054\u3059\u308b\u30da\u30fc\u30b8)\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$sudo vi \/etc\/apache2\/apache2.conf\n\n# Global configuration \n<meta charset=\"utf-8\"># Global configuration\u300d\u306e\u30b3\u30e1\u30f3\u30c8\u306e\u4e0b\u306b\u8ffd\u8a18\n\nServerName www.ichikun.work  #\u4eca\u56de\u306f\u3053\u3061\u3089\u306e\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u306e\u305f\u3081\u8cfc\u5165\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u3092\u8a18\u5165<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo vi \/etc\/apache2\/mods-available\/dir.conf\n&lt;IfModule mod_dir.c&gt;\n\t\t\tDirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm\n&lt;\/IfModule&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ apache2ctl -t -D DUMP_MODULES | grep rewrite\n$sudo a2enmod rewrite\nEnabling module rewrite.\nTo activate the new configuration, you need to run:\n systemctl restart apache2\n\n$sudo systemctl restart apache2\n$apache2ctl -t -D DUMP_MODULES | grep rewrite\n \u3000\u3000rewrite_module (shared)\u3000 \u2190share\u306b\u306a\u308c\u3070\u554f\u984c\u306a\u3057<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo vi \/etc\/apache2\/apache2.conf\n&lt;Directory \/var\/www\/&gt; \n               Options FollowSymLinks  #\u300cIndexes\u300d\u3092\u524a\u9664 \n               AllowOverride All                #\u300cAll\u300d\u306b\u4fee\u6b63 \n                Require all granted \n&lt;\/Directory&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-6_MariaDB\">2-6. MariaDB\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a<\/span><\/h3>\n\n\n\n<p>WordPress\u306b\u306fDB(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9)\u306eMySQL\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<br>\u3057\u304b\u3057\u3001MySQL\u81ea\u4f53\u306f\u6709\u511f\u3068\u306a\u308b\u305f\u3081\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u904b\u7528\u3055\u308c\u3066\u3044\u308bMariaDB\u3092\u4f7f\u7528\u3057\u3066\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install mariadb-server -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo mysql -u root -p\nEnter password: \nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 2\nServer version: 10.1.48-MariaDB-0+deb9u1 Raspbian 9.11\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#091;(none)]&gt; quit\nBye<\/code><\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u521d\u671f\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<br>\u805e\u304b\u308c\u305f\u6587\u8a00\u306b\u3064\u3044\u3066\u306fEnter\u304bY\u3092\u5165\u529b\u3059\u308c\u3070\u554f\u984c\u306a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo  mysql_secure_installation\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!\n\nIn order to log into MariaDB to secure it, we'll need the current\npassword for the root user.  If you've just installed MariaDB, and\nyou haven't set the root password yet, the password will be blank,\nso you should just press enter here.\n\nEnter current password for root (enter for none):<span class=\"has-inline-color has-vivid-red-color\">\uff08\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\uff09<\/span>\nOK, successfully used password, moving on...\n\nSetting the root password ensures that nobody can log into the MariaDB\nroot user without the proper authorisation.\n\nSet root password? &#091;Y\/n]<span class=\"has-inline-color has-vivid-red-color\"> y\n<\/span>New password: \nRe-enter new password: \nPassword updated successfully!\nReloading privilege tables..\n ... Success!\n\n\nBy default, a MariaDB installation has an anonymous user, allowing anyone\nto log into MariaDB without having to have a user account created for\nthem.  This is intended only for testing, and to make the installation\ngo a bit smoother.  You should remove them before moving into a\nproduction environment.\n\nRemove anonymous users? &#091;Y\/n] <span class=\"has-inline-color has-vivid-red-color\">y<\/span>\n ... Success!\n\nNormally, root should only be allowed to connect from 'localhost'.  This\nensures that someone cannot guess at the root password from the network.\n\nDisallow root login remotely? &#091;Y\/n] <span class=\"has-inline-color has-vivid-red-color\">y<\/span>\n ... Success!\n\nBy default, MariaDB comes with a database named 'test' that anyone can\naccess.  This is also intended only for testing, and should be removed\nbefore moving into a production environment.\n\nRemove test database and access to it? &#091;Y\/n] <span class=\"has-inline-color has-vivid-red-color\">y<\/span>\n - Dropping test database...\n ... Success!\n - Removing privileges on test database...\n ... Success!\n\nReloading the privilege tables will ensure that all changes made so far\nwill take effect immediately.\n\nReload privilege tables now? &#091;Y\/n] <span class=\"has-inline-color has-vivid-red-color\">y<\/span>\n ... Success!\n\nCleaning up...\n\nAll done!  If you've completed all of the above steps, your MariaDB\ninstallation should now be secure.\n\nThanks for using MariaDB!<\/code><\/pre>\n\n\n\n<p>\u6b21\u306bWordPress\u3067\u4f7f\u7528\u3059\u308bDB\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br><span class=\"has-inline-color has-vivid-red-color\">\u203b\u8d64\u5b57\u306f\u5404\u81ea\u3067\u6c7a\u3081\u3066\u304f\u3060\u3055\u3044<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ mysql -u root -p\nEnter password: \nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 4\nServer version: 10.1.48-MariaDB-0+deb9u1 Raspbian 9.11\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#091;(none)]&gt; CREATE DATABASE <span class=\"has-inline-color has-vivid-red-color\">it_wordpress<\/span>;\nQuery OK, 1 row affected (0.01 sec)\n\nMariaDB &#091;(none)]&gt; flush privileges;\nQuery OK, 0 rows affected (0.01 sec)\n\nMariaDB &#091;(none)]&gt; GRANT ALL PRIVILEGES ON it_wordpress.* TO \"wp_user\"@\"localhost\" IDENTIFIED BY \"p<span class=\"has-inline-color has-vivid-red-color\">assword<\/span>\";\nQuery OK, 0 rows affected (0.00 sec)\n\nMariaDB &#091;(none)]&gt; flush privileges;\nQuery OK, 0 rows affected (0.00 sec)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-7WordPress\">2-7.WordPress\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h3>\n\n\n\n<p>\u4eca\u56de\u306e\u6839\u5e79\u3068\u306a\u308bWordPress\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u4f5c\u696d\u5185\u3067\u4e00\u822c\u30e6\u30fc\u30b6\u306e\u8aad\u307f\u66f8\u304d\u3092\u53ef\u80fd\u306b\u3059\u308b\u305f\u3081\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306e\u6a29\u9650\u3082\u5909\u66f4\u3057\u307e\u3059<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ wget https:\/\/ja.wordpress.org\/latest-ja.tar.gz\n$ tar -xzvf latest-ja.tar.gz\n$ sudo cp -R .\/wordpress\/* \/var\/www\/html\/\n$ sudo chown -R www-data:www-data \/var\/www\/html\/*<\/code><\/pre>\n\n\n\n<p>\u6700\u5f8c\u306b\u4f5c\u696dPC\u304b\u3089\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"370\" src=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-1024x370.png\" alt=\"\" data-id=\"37\" data-full-url=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08.png\" data-link=\"https:\/\/www.ichikun.work\/?attachment_id=37\" class=\"wp-image-37\" srcset=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-1024x370.png 1024w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-300x108.png 300w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-768x277.png 768w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-1536x554.png 1536w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08-1568x566.png 1568w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.31.08.png 1812w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"925\" src=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-1024x925.png\" alt=\"\" data-id=\"39\" data-full-url=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1.png\" data-link=\"https:\/\/www.ichikun.work\/?attachment_id=39\" class=\"wp-image-39\" srcset=\"https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-1024x925.png 1024w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-300x271.png 300w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-768x694.png 768w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-1536x1387.png 1536w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-2048x1850.png 2048w, https:\/\/www.ichikun.work\/wp-content\/uploads\/2021\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-11-30-14.32.02-1-1568x1416.png 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-8\">2-8.\u30eb\u30fc\u30bf\u8a2d\u5b9a<\/span><\/h3>\n\n\n\n<p>\u30eb\u30fc\u30bf\u306e\u8a2d\u5b9a\u3092\u884c\u308f\u306a\u3044\u3068\u3001\u5916\u90e8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u304f\u306a\u308b\u305f\u3081\u5fc5\u305a\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u30eb\u30fc\u30bf\u306e\u6a5f\u7a2e\u306b\u3088\u3063\u3066\u64cd\u4f5c\u304c\u7570\u306a\u308b\u305f\u3081\u8a73\u7d30\u306f\u7701\u304d\u307e\u3059\u304c\u3001\u300c<span class=\"has-inline-color has-vivid-red-color\">\u56fa\u5b9aIP\u306e\u8a2d\u5b9a<\/span>\u300d\u3068\u300c<span class=\"has-inline-color has-vivid-red-color\">\u30dd\u30fc\u30c8\u8ee2\u9001<\/span>\u300d\u306e\u8a2d\u5b9a\u306f\u5fc5\u9808\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5bb6\u5ead\u7528\u30eb\u30fc\u30bf\u306f\u300cDHCP\u300d\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3044\u308b\u305f\u3081IP\u30a2\u30c9\u30ec\u30b9\u304c\u5909\u66f4\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u305d\u306e\u305f\u3081\u3001\u300c\u30e9\u30ba\u30d1\u30a4\u306f\u3053\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u305a\u3063\u3068\u4f7f\u7528\u3059\u308b\u3093\u3060\u305e\u300d\u3063\u3068\u899a\u3048\u3055\u305b\u3066IP\u304c\u5909\u66f4\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\uff0c\u5bb6\u5ead\u7528\u30eb\u30fc\u30bf\u306f\u5916\u90e8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u62d2\u5426\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u307e\u3059\u3002<br>\u305d\u306e\u305f\u3081\uff0c\u300c\u8ee2\u9001\u8a2d\u5b9a\u300d\u3092\u3057\u3066\u8a31\u53ef\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u203b<span class=\"has-inline-color has-vivid-red-color\">443\u30dd\u30fc\u30c8\u306880\u30dd\u30fc\u30c8<\/span>\u306e\u8a2d\u5b9a\u306f\u5fc5\u305a\u884c\u3063\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"2-9SSL\">2-9.SSL\u8a2d\u5b9a<\/span><\/h3>\n\n\n\n<p>\u6628\u4eca\u306f\u60c5\u5831\u6f0f\u3048\u3044\u306a\u3069\u306e\u89b3\u70b9\u304b\u3089\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u3046\u308b\u3055\u3044\u4e16\u306e\u4e2d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br>\u305d\u306e\u305f\u3081\u3001web\u7248\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u5fdc\u3067\u3042\u308bSSL\u306e\u5bfe\u5fdc\u3092\u884c\u308f\u306a\u3044\u3068Google\u306a\u3069\u306e\u691c\u7d22\u30b5\u30a4\u30c8\u304b\u3089\u9664\u5916\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001SSL\u306e\u5bfe\u5fdc\u3092\u3059\u308b\u3068\u304b\u306a\u308a\u306e\u304a\u91d1\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u500b\u4eba\u30d6\u30ed\u30ac\u30fc\u306f\u5c11\u3057\u3067\u3082\u5b89\u304f\u6291\u3048\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u4eca\u56de\u5c0e\u5165\u3059\u308bSSL\u306f\u7121\u511f\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u300c<span class=\"has-inline-color has-vivid-red-color\">Let&#8217;s Encrypt<\/span>\u300d\u3067\u9375\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install certbot -y\n$sudo certbot certonly\n\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\n\nHow would you like to authenticate with the ACME CA?\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n1: Spin up a temporary webserver (standalone)\n2: Place files in webroot directory (webroot)\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nSelect the appropriate number &#091;1-2] then &#091;enter] (press 'c' to cancel): <span class=\"has-inline-color has-vivid-red-color\">2\n<\/span>Plugins selected: Authenticator webroot, Installer None\nPlease enter in your domain name(s) (comma and\/or space separated)  (Enter 'c'\nto cancel): <span class=\"has-inline-color has-vivid-red-color\">www.ichikun.work (<a href=\"https:\/\/px.a8.net\/svt\/ejp?a8mat=3H5GVJ+BQ4COI+50+2I1T8Y&quot; rel=&quot;nofollow\">\u304a\u540d\u524d.com<\/a>\u306a\u3069\u3067\u8cfc\u5165\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u3092\u8a18\u5165\u3057\u3066\u304f\u3060\u3055\u3044)\n<\/span>Obtaining a new certificate\nPerforming the following challenges:\nhttp-01 challenge for www.ichikun.work\nInput the webroot for www.ichikun.work: (Enter 'c' to cancel): <span class=\"has-inline-color has-vivid-red-color\">\/var\/www\/html\/<\/span>\u3000<span class=\"has-inline-color has-vivid-red-color\">(\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044)<\/span>\nWaiting for verification...\nCleaning up challenges\n\nIMPORTANT NOTES:\n - Congratulations! Your certificate and chain have been saved at:\n   \/etc\/letsencrypt\/live\/www.ichikun.work\/fullchain.pem\n   Your key file has been saved at:\n   \/etc\/letsencrypt\/live\/www.ichikun.work\/privkey.pem\n   Your cert will expire on 2022-03-03. To obtain a new or tweaked\n   version of this certificate in the future, simply run certbot\n   again. To non-interactively renew *all* of your certificates, run\n   \"certbot renew\"\n - If you like Certbot, please consider supporting our work by:\n\n   Donating to ISRG \/ Let's Encrypt:   https:\/\/letsencrypt.org\/donate\n   Donating to EFF:                    https:\/\/eff.org\/donate-le<\/code><\/pre>\n\n\n\n<p>\u6b21\u306bSSL\u306e\u6709\u52b9\u5316\u3092\u5b9f\u65bd\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo a2enmod ssl\nConsidering dependency setenvif for ssl:\nModule setenvif already enabled\nConsidering dependency mime for ssl:\nModule mime already enabled\nConsidering dependency socache_shmcb for ssl:\nEnabling module socache_shmcb.\nEnabling module ssl.\nSee \/usr\/share\/doc\/apache2\/README.Debian.gz on how to configure SSL and create self-signed certificates.\nTo activate the new configuration, you need to run:\n  systemctl restart apache2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> $ sudo a2ensite default-ssl\nEnabling site default-ssl.\nTo activate the new configuration, you need to run:\n  systemctl reload apache2<\/code><\/pre>\n\n\n\n<p>\u3053\u3053\u3067\u63a5\u7d9a\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\u63a5\u7d9a\u3067\u304d\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u5224\u660e\u3057\u307e\u3057\u305f\u3002<br>\u3069\u3046\u3084\u3089Apache\u3068\u9023\u643a\u304c\u3046\u307e\u304f\u3067\u304d\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u8a2d\u5b9a\u5185\u5bb9\u306e\u8ffd\u52a0\u3092\u5b9f\u65bd\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-get install python-certbot-apache -y\n$ sudo certbot --apache\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\nPlugins selected: Authenticator apache, Installer apache\nNo names were found in your configuration files. Please enter in your domain\nname(s) (comma and\/or space separated)  (Enter 'c' to cancel): www.ichikun.work\nCert not yet due for renewal\n\nYou have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.\n(ref: \/etc\/letsencrypt\/renewal\/www.ichikun.work.conf)\n\nWhat would you like to do?\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n1: Attempt to reinstall this existing certificate\n2: Renew &amp; replace the cert (limit ~5 per 7 days)\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nSelect the appropriate number &#091;1-2] then &#091;enter] (press 'c' to cancel): 1\nKeeping the existing certificate\nCreated an SSL vhost at \/etc\/apache2\/sites-available\/000-default-le-ssl.conf\nDeploying Certificate to VirtualHost \/etc\/apache2\/sites-available\/000-default-le-ssl.conf\nEnabling available site: \/etc\/apache2\/sites-available\/000-default-le-ssl.conf\n\nPlease choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n1: No redirect - Make no further changes to the webserver configuration.\n2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for\nnew sites, or if you're confident your site works on HTTPS. You can undo this\nchange by editing your web server's configuration.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nSelect the appropriate number &#091;1-2] then &#091;enter] (press 'c' to cancel): 2\nRedirecting vhost in \/etc\/apache2\/sites-enabled\/000-default.conf to ssl vhost in \/etc\/apache2\/sites-available\/000-default-le-ssl.conf\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nCongratulations! You have successfully enabled https:\/\/www.ichikun.work\n\nYou should test your configuration at:\nhttps:&#47;&#47;www.ssllabs.com\/ssltest\/analyze.html?d=www.ichikun.work\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nIMPORTANT NOTES:\n - Congratulations! Your certificate and chain have been saved at:\n   \/etc\/letsencrypt\/live\/www.ichikun.work\/fullchain.pem\n   Your key file has been saved at:\n   \/etc\/letsencrypt\/live\/www.ichikun.work\/privkey.pem\n   Your cert will expire on 2022-03-03. To obtain a new or tweaked\n   version of this certificate in the future, simply run certbot again\n   with the \"certonly\" option. To non-interactively renew *all* of\n   your certificates, run \"certbot renew\"\n - If you like Certbot, please consider supporting our work by:\n<\/code><\/pre>\n\n\n\n<p>\u6700\u5f8c\u306b\u9375\u306e\u66f4\u65b0\u5fd8\u308c\u9632\u6b62\u306e\u305f\u3081\u306b\u9069\u5b9c\u5b9f\u65bd\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3001crontab\u3067\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$vim \/etc\/cron.monthly\/letsencrypt\n#!\/bin\/sh\n\ncertbot renew --deploy-hook \"service apache2 restart\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$crontab -e\n#\u6700\u7d42\u884c\u306b\u8ffd\u52a0\n00 12 01 * * root \/etc\/cron.monthly\/letsencrypt &gt;\/dev\/null 2&gt;&amp;1<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"3\">3.\u3055\u3044\u3054\u306b<\/span><\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u30e9\u30ba\u30d1\u30a4\u69cb\u7bc9\u306b\u3064\u3044\u3066\u5b9f\u65bd\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n\n\n\n<p>\u4e00\u90e8\u8a2d\u5b9a\u30df\u30b9\u3092\u3057\u3066\u3044\u308b\u90e8\u5206\u3082\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u521d\u5fc3\u8005\u3067\u3082\u534a\u65e5\u3042\u308c\u3070WordPress\u3092\u7acb\u3061\u4e0a\u3052\u3089\u308c\u308b\u3068\u601d\u3046\u306e\u3067\u662f\u975e\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e9\u30ba\u30d1\u30a4\u3067Wordpress\u3092\u5c0e\u5165\u3059\u308b\u3068\u304d\u306e\u624b\u9806\u3092\u8a18\u8f09\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":74,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":23,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions\/85"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"https:\/\/www.ichikun.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ichikun.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}