{"id":2585,"date":"2018-11-23T03:31:35","date_gmt":"2018-11-22T18:31:35","guid":{"rendered":"http:\/\/okamurax.com\/?p=2585"},"modified":"2020-09-02T17:02:30","modified_gmt":"2020-09-02T08:02:30","slug":"2585","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2585","title":{"rendered":"Windows\u4e0a\u306b\u30b5\u30fc\u30d0\u30fc\u4f5c\u6210 Nginx\/PHP\/MariaDB\/WordPress"},"content":{"rendered":"<p>\u4ee5\u524d\u306f\u5fc5\u8981\u306b\u306a\u308b\u3068Xampp\u3092\u4f7f\u3063\u3066\u305f\u3051\u3069\u3001\u4eca\u56de\u306fNginx\u74b0\u5883\u3092\u624b\u52d5\u3067\u4f5c\u3063\u3066\u307f\u308b\u3002<\/p>\n<h2>Nginx<\/h2>\n<p>Windows\u7528\u306ezip\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u89e3\u51cd\u3059\u308b\u3002\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3082\u3068\u3082\u3068\u306e\u30b3\u30e1\u30f3\u30c8\u90e8\u3092\u6d88\u3057\u3066\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p><span style=\"color: #0000ff;\">nginx-1.19.2\/conf\/nginx.conf<\/span><\/p>\n<pre class=\"lang:sh decode:true\">worker_processes  1;\r\n\r\nevents {\r\n    worker_connections  1024;\r\n}\r\n\r\nhttp {\r\n\r\n    include mime.types;\r\n    default_type application\/octet-stream;\r\n    sendfile on;\r\n    keepalive_timeout 65;\r\n\r\n    server {\r\n        listen 80;\r\n        root html;\r\n        index index.php index.html;\r\n\r\n        location ~ \\.php$ {\r\n            fastcgi_pass 127.0.0.1:9000;\r\n            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n            include fastcgi_params;\r\n        }\r\n    }\r\n}<\/pre>\n<p><span style=\"color: #333333;\">Nginx\u30d5\u30a9\u30eb\u30c0<\/span>\u306e\u30d1\u30b9\u306b\u65e5\u672c\u8a9e\u304c\u3042\u308b\u3068\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<h2>PHP<\/h2>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u89e3\u51cd\u3057\u305f\u3089\u3001php\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3067nginx\u306e\u4e2d\u306b\u5165\u308c\u308b\u3002<br \/>\n<span style=\"color: #0000ff;\">(nginx-1.19.2\/php)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">php.ini-development<\/span><br \/>\n\u3092\u30b3\u30d4\u30fc\u3057\u3066php.ini\u306b\u3057\u3001<br \/>\n<span style=\"color: #0000ff;\">extension_dir=&#8221;ext&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">extension=php_mysqli.dll<br \/>\n<\/span>\u3092\u8ffd\u8a18\u3059\u308b\u3002<\/p>\n<h2>MariaDB<\/h2>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u89e3\u51cd\u3057\u305f\u3089\u3001mariadb\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3067nginx\u306e\u4e2d\u306b\u5165\u308c\u308b\u3002<br \/>\n<span style=\"color: #0000ff;\">(nginx-1.19.2\/mariadb)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">nginx-1.19.2\/mariadb\/bin<br \/>\n<\/span>\u306e\u4e2d\u306b\u3042\u308b\u3001mysql_install_db.exe\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<br \/>\n<span style=\"color: #0000ff;\">nginx-1.19.2\/mariadb\/data<br \/>\n<\/span>\u304c\u4f5c\u6210\u3055\u308c\u3001my.ini\u3082\u5165\u3063\u3066\u3044\u308b\u3002<br \/>\n<span style=\"color: #333333;\">(Nginx\u30d5\u30a9\u30eb\u30c0\u3092\u79fb\u52d5\u3057\u305f\u3089my.ini\u3092\u4fee\u6b63\u3057\u306a\u3044\u3068\u8d77\u52d5\u3057\u306a\u3044)<\/span><\/p>\n<p>\u624b\u52d5\u3067DB\u4f5c\u6210\u7b49\u306b\u4f7f\u3046\u5834\u5408\u3001\u307e\u305abin\u306e\u4e2d\u306emysqld.exe\u3092\u8d77\u52d5\u3002\u6b21\u306b\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089mysql -u root \u306e\u3088\u3046\u306a\u611f\u3058\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3002<\/p>\n<p>\u30fb\u8a2d\u5b9a<br \/>\n<span style=\"color: #0000ff;\">nginx-1.19.2\/mariadb\/bin<br \/>\n<\/span>\u306b\u79fb\u52d5\u3057mysqld\u3092\u8d77\u52d5\u5f8c\u3001<br \/>\n<span style=\"color: #0000ff;\">mysql -u root<\/span><br \/>\n\u3068\u3059\u308b\u3068\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3002<\/p>\n<p><span style=\"color: #0000ff;\">mysql&gt; set password = password(&#8220;1234&#8221;);<\/span><\/p>\n<p>\u30fb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210<br \/>\n<span style=\"color: #0000ff;\">mysql&gt; create database wpd character set utf8;<\/span><br \/>\n(utf8\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068WP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u30a8\u30e9\u30fc)<\/p>\n<h2>\u8d77\u52d5\u30fb\u7d42\u4e86\u30d0\u30c3\u30c1<\/h2>\n<p>start.bat<\/p>\n<pre class=\"lang:sh decode:true \">start nginx.exe\r\nstart \/min php\/php-cgi.exe -b 127.0.0.1:9000\r\nstart mariadb\/bin\/mysqld.exe<\/pre>\n<p>my.ini\u3092\u81ea\u52d5\u3067\u66f8\u304d\u63db\u3048\u308b\u5834\u5408\u3053\u306e\u3088\u3046\u306a\u611f\u3058<\/p>\n<pre class=\"lang:default decode:true\">echo [mysqld] &gt; .\/mariadb\/data\/my.ini\r\nset p=%~dp0mariadb\/data\r\necho datadir=%p:\\=\/% &gt;&gt; .\/mariadb\/data\/my.ini\r\necho [client] &gt;&gt; .\/mariadb\/data\/my.ini\r\nset p=%~dp0mariadb\/lib\/plugin\r\necho plugin-dir=%p:\\=\/% &gt;&gt; .\/mariadb\/data\/my.ini\r\n\r\nstart nginx.exe\r\nstart \/min php\/php-cgi.exe -b 127.0.0.1:9000\r\nstart mariadb\/bin\/mysqld.exe\r\n<\/pre>\n<p>stop.bat<\/p>\n<pre class=\"lang:default decode:true \">nginx.exe -s quit\r\nTaskkill \/f \/im php-cgi.exe\r\nmariadb\/bin\/mysqladmin.exe -u root -p1234 shutdown<\/pre>\n<p>\u3042\u308b\u3044\u306f\u5168\u3066\u5f37\u5236\u7d42\u4e86<br \/>\n(\u3053\u3046\u3057\u306a\u3044\u3068\u30d7\u30ed\u30bb\u30b9\u304c\u6b8b\u308b\u5834\u5408\u3042\u308a)<\/p>\n<pre class=\"lang:sh decode:true\">Taskkill \/f \/im nginx.exe\r\nTaskkill \/f \/im php-cgi.exe\r\nTaskkill \/f \/im mysqld.exe<\/pre>\n<p>mysql.bat<\/p>\n<p>mysql\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3059\u308b\u305f\u3081\u3060\u3051\u306e\u30d0\u30c3\u30c1<\/p>\n<pre class=\"lang:default decode:true\">cd %~dp0mariadb\/bin\r\ncmd \/k<\/pre>\n<h2>WordPress<\/h2>\n<p>nginx-1.19.2\\html\\wp<br \/>\n<span style=\"color: #0000ff;\"><span style=\"color: #333333;\">\u306bWordPress\u3092\u89e3\u51cd\u3057\u305f\u306e\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u3001<\/span><br \/>\nhttp:\/\/localhost\/wp<\/span><br \/>\n\u306b\u30a2\u30af\u30bb\u30b9\u3002<\/p>\n<p>DB\u306e\u60c5\u5831\u3092\u5165\u308c\u3066\u9001\u4fe1\u3057\u305f\u3068\u3053\u308d\u3001<br \/>\n\u30b5\u30a4\u30c8\u306b\u91cd\u5927\u306a\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3068\u8868\u793a\u3055\u308c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3002<br \/>\n(\uff11\u5ea6\u76ee\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb)<\/p>\n<p>\u30fbDB\u3092\u30ea\u30bb\u30c3\u30c8<br \/>\n\u30d5\u30a9\u30eb\u30c0\u3092\u624b\u52d5\u3067\u524a\u9664\u305b\u305a\u3001mysql\u306e\u30b3\u30de\u30f3\u30c9\u304b\u3089drop database\u3059\u308b\u3002<br \/>\n\u305d\u3057\u3066\u518d\u5ea6create database\u3059\u308b\u3002<\/p>\n<p>\u30fbwp-config.php\u3092\u524a\u9664<br \/>\nwp-config-sample.php\u3092\u8907\u5199\u3057\u3001\u540d\u524d\u3092wp-config.php\u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n<p>wp-config.php\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u81ea\u52d5\u3067wp-config.php\u306f\u4f5c\u6210\u3055\u308c\u308b\u304c\u3001\u3053\u3053\u3067\u306f\u624b\u52d5\u3067wp-config.php\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>wp-config.php\u306e\u4ee5\u4e0b\u306e\u90e8\u5206\u3092true\u306b\u5909\u66f4\u3059\u308b\u3002<br \/>\n<span style=\"color: #0000ff;\">define( &#8216;WP_DEBUG&#8217;, true);<\/span><\/p>\n<p>\u4ee5\u4e0b\u306e\u90e8\u5206\u306bDB\u60c5\u5831\u3092\u8a18\u5165\u3059\u308b\u3002<br \/>\n<span style=\"color: #0000ff;\">define( &#8216;DB_NAME&#8217;, &#8216;wpd&#8217; );<\/span><br \/>\n<span style=\"color: #0000ff;\">define(\u00a0&#8216;DB_USER&#8217;,\u00a0&#8216;root&#8217;\u00a0);<\/span><br \/>\n<span style=\"color: #0000ff;\">define(\u00a0&#8216;DB_PASSWORD&#8217;,\u00a0&#8216;1234&#8217;\u00a0);<\/span><\/p>\n<p>\u518d\u5ea6\u6311\u6226\u3059\u308b\u304c\u3001<br \/>\n\u30b5\u30a4\u30c8\u306b\u91cd\u5927\u306a\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3068\u8868\u793a\u3055\u308c\u308b\u3060\u3051\u3067\u3001\u7279\u306b\u30a8\u30e9\u30fc\u5185\u5bb9\u306f\u8868\u793a\u3055\u308c\u306a\u3044\u3002<br \/>\n(\uff12\u5ea6\u76ee\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb)<\/p>\n<p>Nginx\u306e\u30ed\u30b0(logs\/error.log)<br \/>\n\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001<br \/>\n<span style=\"color: #0000ff;\">Fatal error: Maximum execution time of 30 seconds exceeded<br \/>\n<span style=\"color: #333333;\">\u3068\u3042\u308b\u306e\u3067\u3001<br \/>\n<\/span><\/span>php.ini\u3067\u4e0b\u8a18\u306e\u90e8\u5206\u309230\u304b\u3089120\u306b\u5909\u66f4<br \/>\n<span style=\"color: #0000ff;\">max_execution_time = 120<br \/>\n<\/span>(\uff13\u5ea6\u76ee\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb)<\/p>\n<p>\u3053\u308c\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u3002<\/p>\n<p>LAN\u7d4c\u7531(\u5916\u90e8)\u304b\u3089\u898b\u308b\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u306b\u65b0\u3057\u3044\u898f\u5247\u3092\u8ffd\u52a0\u3059\u308b\u3002<br \/>\n\u3082\u3057CSS\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001<br \/>\n<span style=\"color: #0000ff;\">\u8a2d\u5b9a\uff1e\u4e00\u822c\uff1e\u30a2\u30c9\u30ec\u30b9<\/span><br \/>\n\u3092IP\u30a2\u30c9\u30ec\u30b9\u306b\u5909\u66f4\u3057\u3066\u307f\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u306f\u5fc5\u8981\u306b\u306a\u308b\u3068Xampp\u3092\u4f7f\u3063\u3066\u305f\u3051\u3069\u3001\u4eca\u56de\u306fNginx\u74b0\u5883\u3092\u624b\u52d5\u3067\u4f5c\u3063\u3066\u307f\u308b\u3002 Nginx Windows\u7528\u306ezip\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u89e3\u51cd\u3059\u308b\u3002\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3082\u3068\u3082\u3068\u306e\u30b3\u30e1\u30f3\u30c8\u90e8\u3092\u6d88\u3057\u3066\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u3093\u306a\u611f\u3058 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2585\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Windows\u4e0a\u306b\u30b5\u30fc\u30d0\u30fc\u4f5c\u6210 Nginx\/PHP\/MariaDB\/WordPress&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[42,13,3,85],"class_list":["post-2585","post","type-post","status-publish","format-standard","hentry","category-1","tag-apache","tag-mysql-mariadb","tag-php","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2585"}],"version-history":[{"count":24,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2585\/revisions"}],"predecessor-version":[{"id":3709,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2585\/revisions\/3709"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}