{"id":420,"date":"2017-09-03T19:02:01","date_gmt":"2017-09-03T10:02:01","guid":{"rendered":"http:\/\/daily-memorials.net\/?p=420"},"modified":"2023-01-12T14:14:23","modified_gmt":"2023-01-12T05:14:23","slug":"vps%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"http:\/\/daily-memorials.net\/?p=420","title":{"rendered":"VPS\u5099\u5fd8\u9332"},"content":{"rendered":"\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#wordpressapache\"><span class=\"toc_number toc_depth_1\">1<\/span> wordpress\u306fapache\u3067\u8d77\u52d5\u3057\u3066\u3044\u308b<\/a><\/li><li><a href=\"#SSH22\"><span class=\"toc_number toc_depth_1\">2<\/span> SSH\u306e\u30dd\u30fc\u30c8\u306f22\u756a\u4ee5\u5916\u306b\u3059\u308b\u3002<\/a><\/li><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">3<\/span> \u30eb\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u3088\u3046<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">4<\/span> \u516c\u958b\u9375\u8a8d\u8a3c\u306b\u3057\u3088\u3046<\/a><\/li><li><a href=\"#SSH\"><span class=\"toc_number toc_depth_1\">5<\/span> SSH\u30ed\u30b0\u30a4\u30f3\u306e\u969b\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8981\u6c42\u3092\u306a\u304f\u3059\u65b9\u6cd5<\/a><\/li><\/ul><\/div>\n<h2><span id=\"wordpressapache\">wordpress\u306fapache\u3067\u8d77\u52d5\u3057\u3066\u3044\u308b<\/span><\/h2>\n\n\n\n<p>\u5f53\u30b5\u30a4\u30c8\u306fwordpress\u3092\/var\/www\/html\/wp1\/\u306bwordpress\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u3044\u308b\u3002wordpress\u306fapache\u3067\u52d5\u304b\u3057\u3066\u3044\u308b\u306f\u305a\u3002path=usr\/lib\/systemd\/system\/httpd.service.dc<br>&nbsp;\/etc\/httpd\/conf\/httpd.conf\u306e\u8a2d\u5b9a\u3067\u306fDocument Root\u306e\u8a2d\u5b9a\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b<br>DocumentRoot &#8220;\/var\/www\/html&#8221;<br>apache\u306e\u8d77\u52d5\u30b3\u30de\u30f3\u30c9<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nservice httpd start\n<\/pre><\/div>\n\n\n<h2><span id=\"SSH22\">SSH\u306e\u30dd\u30fc\u30c8\u306f22\u756a\u4ee5\u5916\u306b\u3059\u308b\u3002<\/span><\/h2>\n\n\n\n<p>SSH\u306e\u30dd\u30fc\u30c8\u309222\u756a\u306e\u307e\u307e\u306b\u3059\u308b\u3068\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u306e\u7684\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u756a\u53f7\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u653b\u6483\u3092\u56de\u907f\u3059\u308b\u306e\u304c\u4e00\u822c\u306b\u306f\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<br>(1)\u30b5\u30fc\u30d0\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066vim\u3067ssh\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo vim \/etc\/ssh\/sshd_config\n<\/pre><\/div>\n\n\n<p><br>(2)\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPort 10022\n<\/pre><\/div>\n\n\n<p>(3)ssh\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n sudo service sshd restart\n<\/pre><\/div>\n\n\n<h2><span id=\"i\">\u30eb\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u3088\u3046<\/span><\/h2>\n\n\n\n<p>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56\u306e\u305f\u3081\u306b\u30eb\u30fc\u30c8\u3078\u306e\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u307e\u3059\u3002\u5148\u307b\u3069\u3068\u540c\u3058\u3088\u3046\u306bvim\u3067ssh\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPermitRootLogin no\n<\/pre><\/div>\n\n\n<h2><span id=\"i-2\">\u516c\u958b\u9375\u8a8d\u8a3c\u306b\u3057\u3088\u3046<\/span><\/h2>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u5074\u306b\u516c\u958b\u9375\u3092\u8a2d\u7f6e\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u3067\u79d8\u5bc6\u9375\u3092\u6301\u305f\u306a\u3044\u3068\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u3060\u3051\u306e\u4fdd\u8b77\u3088\u308a\u3082\u5b89\u5168\u6027\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nssh-keygen -t rsa\n<\/pre><\/div>\n\n\n<p> \u3053\u308c\u306b\u3088\u3063\u3066\/.ssh\u306b&#8221;id_rsa&#8221;,&#8221;id_rsa.pub&#8221;\u304c\u3067\u304d\u307e\u3059\u3002id_rsa.pub\u3092\u30b5\u30fc\u30d0\u30fc\u5074\u306e\/.ssh\u306b\u8a2d\u7f6e\u3057\u540d\u524d\u3092&#8221;authorized_keys&#8221;\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002 \u6700\u5f8c\u306bvim\u3067ssh\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPubkeyAuthentication yes\nPasswordAuthentication no\n<\/pre><\/div>\n\n\n<p><br>\u3068\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2><span id=\"SSH\">SSH\u30ed\u30b0\u30a4\u30f3\u306e\u969b\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8981\u6c42\u3092\u306a\u304f\u3059\u65b9\u6cd5<\/span><\/h2>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u306e\/.ssh\/config\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u8fbc\u3080<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nHost \"\u30b5\u30fc\u30d0\u306e\u540d\u524d\"\nHostName \"\u30b5\u30fc\u30d0\u306eURL\"\nPort 10022\nUseKeychain yes\nAddKeysToAgent yes\n<\/pre><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 wordpress\u306fapache\u3067\u8d77\u52d5\u3057\u3066\u3044\u308b2 SSH\u306e\u30dd\u30fc\u30c8\u306f22\u756a\u4ee5\u5916\u306b\u3059\u308b\u30023 \u30eb\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u3092\u7981\u6b62\u3057\u3088\u30464 \u516c\u958b\u9375\u8a8d\u8a3c\u306b\u3057\u3088\u30465 SSH\u30ed\u30b0\u30a4\u30f3\u306e\u969b\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8981\u6c42\u3092\u306a\u304f\u3059\u65b9\u6cd5 wordpr &hellip; <a href=\"http:\/\/daily-memorials.net\/?p=420\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VPS\u5099\u5fd8\u9332&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/420"}],"collection":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=420"}],"version-history":[{"count":12,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/420\/revisions"}],"predecessor-version":[{"id":1092,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=\/wp\/v2\/posts\/420\/revisions\/1092"}],"wp:attachment":[{"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/daily-memorials.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}