{"id":550,"date":"2020-12-14T16:46:29","date_gmt":"2020-12-14T07:46:29","guid":{"rendered":"https:\/\/eng.miteel.net\/?page_id=550"},"modified":"2024-04-20T12:55:53","modified_gmt":"2024-04-20T03:55:53","slug":"web-%e3%81%ae%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97nginx","status":"publish","type":"page","link":"https:\/\/eng.miteel.net\/?page_id=550","title":{"rendered":"web \u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7(Nginx)"},"content":{"rendered":"\n<p>\u3010ubuntu20.20\u3067\u5fc5\u8981\u3060\u3063\u305f\u3082\u306e\u4e00\u89a7\u3011<\/p>\n\n\n\n<p><code>apt install nginx -y<br>apt install mysql-client -y<br>apt install mariadb-server -y<br>apt install php7.4 php7.4-cli php7.4-fpm php7.4-curl -y<br>apt install php7.4-mbstring php7.4-mysql php7.4-xml -y<br>apt install unzip -y<\/code><br> <br>php8.1\u306e\u5834\u5408<br> <code>apt install php8.1 php8.1-cli php8.1-fpm php8.1-curl php8.1-mbstring php8.1-mysql php8.1-xml -y<\/code> <\/p>\n\n\n\n<p>php8.2\u306e\u5834\u5408(debian12 bookworm)<\/p>\n\n\n\n<p><code>sudo apt install nginx mariadb-client mariadb-server php8.2 php8.2-cli php8.2-fpm php8.2-curl php8.2-mbstring php8.2-mysql php8.2-xml -y<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3010\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\u30fc\u306e\u8ffd\u52a0\u3011<\/p>\n\n\n\n<p>\u203b\u3000MariaDB\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u3001id\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u6307\u5b9a\u3067in\u3067\u304d\u308b<br>\u3000\u3000\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u7121\u3044\u306e\u3067\u3001su\u304b\u3089mysql\u3092\u8d77\u52d5\u3057\u3001\u4e0b\u8a18\u306e<br>\u3000\u3000SQL\u3067\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u3063\u3066\u304a\u304b\u306a\u3044\u3068\u3001phpmyadmin\u304c\u4f7f<br>\u3000\u3000\u3048\u306a\u3044<\/p>\n\n\n\n<p><code>CREATE USER `useraccount`@`%` IDENTIFIED BY `password`;<br>GRANT ALL PRIVILEGES ON *.* TO `useraccount`@`%` WITH GRANT OPTION;<\/code><\/p>\n\n\n\n<p>\u203b\u3000\u4e0a\u8a18\u3060\u3068\u30a8\u30e9\u30fc\u306e\u5834\u5408<\/p>\n\n\n\n<p><code>CREATE USER \"useraccount\"@\"%\" IDENTIFIED BY \"password\";<br>\nGRANT ALL PRIVILEGES ON *.* TO \"useraccount\"@\"%\" WITH GRANT OPTION;<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3010NGinx \u306e\u8a2d\u5b9a\u3011<\/p>\n\n\n\n<p>vi \/etc\/nginx\/sites-available\/default<\/p>\n\n\n\n<p>\u203b\u3000\u4ee5\u4e0bServer{}\u306b\u5165\u308c\u308b<br>\u3000\u3000server\u306f\u8907\u6570\u5b9a\u7fa9\u3067\u304d\u308b\u306e\u3067\u30dd\u30fc\u30c8\u5358\u4f4d\u3067\u5225\u52d5\u4f5c\u3082\u7c21\u5358<\/p>\n\n\n\n<p>\u3000\u3000wordpress\u3067\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001wordpress\u306e<br>\u3000\u3000root\u5358\u4f4d\u306b\u8a2d\u5b9a\u3092\u3059\u308b\u5fc5\u8981\u3042\u308a<br>\u3000\u3000\u4f8b\u3067\u306f\u3000\/, \/miteel \u306e\uff12\u500b\u306ewordpress\u304c\u3042\u308b\u5834\u5408\u3092\u60f3\u5b9a<\/p>\n\n\n\n<p>\u3000\u3000client_max_body_size 100m;\u3000\u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30b5\u30a4\u30ba<br>\u3000\u3000\u3092\u5927\u304d\u304f\u3059\u308b\u969b\u306b\u5408\u308f\u305b\u3066\u5927\u304d\u304f\u3057\u3066\u304a\u304f\u5fc5\u8981\u3042\u308a<\/p>\n\n\n\n<p>client_max_body_size 100m;<br>server_name tkz.miteel.net;<br>index index.php index.html index.htm index.nginx-debian.html;<\/p>\n\n\n\n<p>location ~ .php$ {<br>include snippets\/fastcgi-php.conf;<br>fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;<br>}<\/p>\n\n\n\n<p>location \/ {<br>try_files $uri $uri\/ \/index.php?$args;<br>}<\/p>\n\n\n\n<p>location \/miteel {<br>try_files $uri $uri\/ \/miteel\/index.php?$args;<br>}<\/p>\n\n\n\n<p>\u3010php.ini\u3092\u8a2d\u5b9a\u3011<\/p>\n\n\n\n<p>\u203b\u3000\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c2M\u30ea\u30df\u30c3\u30c8\u3067\u4f7f\u3048\u306a\u3044\u306e\u3067\u4ee5\u4e0b\u3092\u8a2d\u5b9a<br>\u52b9\u3044\u3066\u3044\u308b\u3000php.ini\u3000\u306f\u3000phpinfo();\u3000\u3067\u78ba\u8a8d\u3067\u304d\u308b<\/p>\n\n\n\n<p>vi \/etc\/php\/7.4\/fpm\/php.ini<\/p>\n\n\n\n<p>post_max_size = 100M<br>upload_max_filesize = 100M<br>memory_limit = 512M<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f php8.0 \u306e\u30df\u30cb\u30de\u30e0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3001phpmyadmin\u306e\u52d5\u4f5c\u78ba\u8a8d\u6e08\u307f<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code>\nsudo apt install nginx -y\nsudo apt install php8.0 php8.0-fpm php8.0-mysql -y\nsudo apt install mariadb-server mariadb-client -y\nsudo mariadb-secure-installation\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3010ubuntu20.20\u3067\u5fc5\u8981\u3060\u3063\u305f\u3082\u306e\u4e00\u89a7\u3011 apt install nginx -yapt install mysql-client -yapt install mariadb-server -yapt instal &hellip; <a href=\"https:\/\/eng.miteel.net\/?page_id=550\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">web \u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7(Nginx)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":368,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-550","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=550"}],"version-history":[{"count":14,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/550\/revisions"}],"predecessor-version":[{"id":1062,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/550\/revisions\/1062"}],"up":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/368"}],"wp:attachment":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}