{"id":262,"date":"2025-06-13T22:59:09","date_gmt":"2025-06-13T14:59:09","guid":{"rendered":"https:\/\/note.yuncrown.com\/?p=262"},"modified":"2025-10-14T20:02:27","modified_gmt":"2025-10-14T12:02:27","slug":"%e9%93%b6%e6%b2%b3%e9%ba%92%e9%ba%9f%e7%b3%bb%e7%bb%9f%e7%a6%bb%e7%ba%bf%e5%ae%89%e8%a3%85php%e7%ab%99%e7%82%b9","status":"publish","type":"post","link":"https:\/\/note.yuncrown.com\/index.php\/2025\/06\/13\/%e9%93%b6%e6%b2%b3%e9%ba%92%e9%ba%9f%e7%b3%bb%e7%bb%9f%e7%a6%bb%e7%ba%bf%e5%ae%89%e8%a3%85php%e7%ab%99%e7%82%b9\/","title":{"rendered":"\u94f6\u6cb3\u9e92\u9e9f\u7cfb\u7edf\u79bb\u7ebf\u5b89\u88c5php\u7ad9\u70b9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u524d\u671f\u51c6\u5907<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5982\u679c\u5728\u865a\u62df\u673a\u91cc\u5b89\u88c5\u94f6\u6cb3\u9e92\u9e9f\u7cfb\u7edf\uff0c\u53ef\u80fd\u9700\u8981\u5148\u5b89\u88c5ssh\u7528\u4e8e\u8fde\u63a5\u7cfb\u7edf\u548cSFTP\u4e0a\u4f20\u6587\u4ef6\n# \u8fd9\u4e00\u6b65\u662f\u5728\u7ebf\u5b89\u88c5\u7684\uff0c\u5728\u6b63\u5f0f\u73af\u5883\u4e0d\u9700\u8981\n# \u67e5\u770b\u7cfb\u7edf\u662f\u5426\u5b89\u88c5SSH\nrpm -qa | grep openssh-server\n# \u5b89\u88c5SSH\nsudo yum install -y openssh-server\n# \u542f\u52a8 SSH \u670d\u52a1\nsudo systemctl start sshd  \n# \u8bbe\u7f6e\u5f00\u673a\u81ea\u542f       \nsudo systemctl enable sshd    \n# \u786e\u8ba4 SSH \u670d\u52a1\u8fd0\u884c\u72b6\u6001\uff08\u663e\u793aactive (running)\u8868\u793a\u6b63\u5728\u8fd0\u884c\uff09\nsudo systemctl status sshd    \n# \u67e5\u770b\u7cfb\u7edf\u5185\u7f51ip\u663e\u793a\u7684192.168.xx.xx\u5c31\u662f\u5185\u7f51\u5730\u5740\uff0c\u5728\u6b63\u5f0f\u73af\u5883\u5e94\u8be5\u662f\u4e8b\u5148\u51c6\u5907\u597d\u7684\nifconfig <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f7f\u7528FTP\u5de5\u5177\u5c06\u6240\u6709\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u590d\u5236\u5230\u670d\u52a1\u5668\/opt\u76ee\u5f55<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b89\u88c5nginx1.24<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8bd1 Nginx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fdb\u5165\/opt\/lnmp\u76ee\u5f55\ncd \/opt\/lnmp\/\n# \u89e3\u538bnginx\u538b\u7f29\u5305\nsudo tar -zxvf nginx-1.24.0.tar.gz\n# \u8fdb\u5165nginx\u76ee\u5f55\ncd \/opt\/lnmp\/nginx-1.24.0\n# \u7f16\u8bd1nginx\uff0c\u4ee5\u4e0b\u547d\u4ee4\u5206\u4e09\u6b21\u8f93\u5165\uff0c\u6bcf\u8f93\u5165\u4e00\u6b21\u6309\u56de\u8f66\n# \u68c0\u67e5\n.\/configure --prefix=\/usr\/local\/nginx\n# \u7f16\u8bd1\nmake -j$(nproc)\n# \u5b89\u88c5\nsudo make install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e Systemd \u670d\u52a1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u521b\u5efa\u670d\u52a1\u6587\u4ef6\nsudo nano \/usr\/lib\/systemd\/system\/nginx.service\n# \u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\n&#91;Unit]\nDescription=The nginx HTTP and reverse proxy server\nAfter=network.target\n\n&#91;Service]\nType=forking\nPIDFile=\/usr\/local\/nginx\/logs\/nginx.pid\nExecStartPre=\/usr\/local\/nginx\/sbin\/nginx -t\nExecStart=\/usr\/local\/nginx\/sbin\/nginx\nExecReload=\/usr\/local\/nginx\/sbin\/nginx -s reload\nExecStop=\/usr\/local\/nginx\/sbin\/nginx -s quit\nPrivateTmp=true\n\n&#91;Install]\nWantedBy=multi-user.target\n# \u4ee5\u4e0a\u4e3a\u6587\u4ef6\u5185\u5bb9, \u6309 Ctrl + X\uff0c\u518d\u6309Y\uff0c\u518d\u6309\u56de\u8f66\u4fdd\u5b58\u5e76\u9000\u51fa\n# \u8bbe\u7f6e\u6743\u9650\nsudo mkdir -p \/usr\/local\/nginx\/logs      # \u521b\u5efa\u76ee\u5f55\uff08\u5982\u679c\u5b58\u5728\uff09\nsudo chown -R root:root \/usr\/local\/nginx # \u5c06\u76ee\u5f55\u6240\u6709\u8005\u548c\u7ec4\u6539\u6210root\nsudo chmod -R 755 \/usr\/local\/nginx\/logs  # \u4fee\u6539\u76ee\u5f55\u6743\u9650\n# \u542f\u7528\u670d\u52a1\nsudo systemctl daemon-reload   # \u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\uff08\u521a\u624d\u7684service\u6587\u4ef6\uff09\nsudo systemctl start nginx     # \u542f\u52a8nginx\nsudo systemctl enable nginx    # \u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u542f\u52a8\nsudo systemctl status nginx    # \u67e5\u770bnginx\u8fd0\u884c\u72b6\u6001\uff0c\u51fa\u73b0active (running)\u8868\u793a\u6b63\u5728\u8fd0\u884c\n#\u67e5\u770bnginx\u662f\u5426\u5df2\u5b89\u88c5\u6210\u529f\nnginx -V # \u8f93\u51fanginx\u7248\u672c\u53f7\u8868\u793a\u5b89\u88c5\u6210\u529f\n# \u5982\u679c\u8f93\u51fanginx: \u547d\u4ee4\u672a\u627e\u5230\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\necho 'export PATH=$PATH:\/usr\/local\/nginx\/sbin' &gt;&gt; ~\/.bashrc # \u5c06Nginx\u7684\u53ef\u6267\u884c\u6587\u4ef6\u76ee\u5f55\u6c38\u4e45\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\nsource ~\/.bashrc # \u7acb\u5373\u52a0\u8f7d ~\/.bashrc \u6587\u4ef6\u4e2d\u7684\u66f4\u6539\uff0c\u4f7f\u5f53\u524d\u7ec8\u7aef\u4f1a\u8bdd\u751f\u6548<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b89\u88c5php8.2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5\u5fc5\u8981\u4f9d\u8d56\uff0c\u5728\/opt\/lnmp\/php-deps\u76ee\u5f55\u4e0b\u8fd0\u884c\uff0c\u6240\u6709\u7684\u6269\u5c55\u548c\u4f9d\u8d56\u90fd\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\n#\u8fdb\u5165\/opt\/lnmp\/php-deps\u76ee\u5f55\ncd \/opt\/lnmp\/php-deps\n#\u5b89\u88c5\u4f9d\u8d56\nsudo rpm -ivh libcurl-devel-7.71.1-32.ky10.x86_64.rpm\nsudo rpm -ivh oniguruma-*.rpm oniguruma-devel-*.rpm\nsudo rpm -ivh \\\n    libzip-1.5.1-5.ky10.x86_64.rpm \\\n    libzip-devel-1.5.1-5.ky10.x86_64.rpm \\\n    libzip-help-1.5.1-5.ky10.noarch.rpm\n#\u89e3\u538bphp\u5b89\u88c5\u5305\ncd \/opt\/lnmp\/ # \u8fdb\u5165\u5b89\u88c5\u5305\u6240\u5728\u76ee\u5f55\ntar -xzvf php-8.2.28.tar.gz # \u89e3\u538b\u5b89\u88c5\u5305\ncd \/opt\/lnmp\/php-8.2.28 # \u8fdb\u5165\u5b89\u88c5\u5305\u6839\u76ee\u5f55\n# \u7f16\u8bd1php8.2\uff0c\u9700\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\n.\/configure \\\n  --prefix=\/usr\/local\/php \\\n  --with-config-file-path=\/usr\/local\/php\/etc \\\n  --enable-fpm \\\n  --with-fpm-user=nginx \\\n  --with-fpm-group=nginx \\\n  --with-openssl \\\n  --with-zip \\\n  --with-pdo-mysql \\\n  --with-curl \\\n  --enable-mbstring \\\n  --enable-xml\n# \u4ee5\u4e0a\u662f\u4e00\u4e2a\u547d\u4ee4\n\nmake -j$(nproc)\nsudo make install\n# \u67e5\u770bphp\u662f\u5426\u5df2\u5b89\u88c5\u6210\u529f\nphp --version # \u8f93\u51faphp\u7248\u672c\u53f7\u8868\u793a\u5b89\u88c5\u6210\u529f\n# \u5982\u679c\u8f93\u51faphp: \u547d\u4ee4\u672a\u627e\u5230\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\necho 'export PATH=\/usr\/local\/php\/bin:$PATH' &gt;&gt; ~\/.bashrc\nsource ~\/.bashrc # \u7acb\u5373\u52a0\u8f7d ~\/.bashrc \u6587\u4ef6\u4e2d\u7684\u66f4\u6539\uff0c\u4f7f\u5f53\u524d\u7ec8\u7aef\u4f1a\u8bdd\u751f\u6548<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6ephp\u670d\u52a1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fdb\u5165php-8.2.28\u76ee\u5f55(\u89e3\u538b\u51fa\u6765\u7684\u8f6f\u4ef6\u76ee\u5f55)\ncd \/opt\/lnmp\/php-8.2.28\n# \u590d\u5236\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\nsudo cp .\/sapi\/fpm\/php-fpm.conf \/usr\/local\/php\/etc\/php-fpm.conf\nsudo cp .\/sapi\/fpm\/www.conf \/usr\/local\/php\/etc\/php-fpm.d\/www.conf\n# \u7f16\u8f91\u4e3b\u914d\u7f6e\u6587\u4ef6\nsudo nano \/usr\/local\/php\/etc\/php-fpm.conf\n# \u786e\u4fdd\u5305\u542b\u4e00\u4e0b\u5185\u5bb9\uff08\u5982\u679c\u6ca1\u6709\u6216\u8005\u88ab;\u6ce8\u91ca\u6389\u4e86\u5c31\u5728\u6700\u540e\u52a0\u4e0a\uff09\n&#91;global] # \u8fd9\u4e00\u884c\u5e94\u8be5\u662f\u672c\u6765\u5c31\u6709\u7684\uff0c\u4e0b\u9762\u4e09\u884c\u770b\u4e00\u4e0b\npid = \/usr\/local\/php\/var\/run\/php-fpm.pid\nerror_log = \/usr\/local\/php\/var\/log\/php-fpm.log\ninclude=\/usr\/local\/php\/etc\/php-fpm.d\/*.conf\n# \u521b\u5efa\u7cfb\u7edf\u7528\u6237\u7ec4\nsudo groupadd -r nginx\n# \u521b\u5efa\u7cfb\u7edf\u7528\u6237\nsudo useradd -r -g nginx -s \/sbin\/nologin -d \/var\/empty -c \"Nginx User\" nginx\n# \u7f16\u8f91\u8fdb\u7a0b\u6c60\u914d\u7f6e\nsudo nano \/usr\/local\/php\/etc\/php-fpm.d\/www.conf\n# \u786e\u4fdd\u5305\u542b\nuser = nginx\ngroup = nginx\nlisten = 127.0.0.1:9000\n# \u521b\u5efa\u5fc5\u8981\u76ee\u5f55\u5e76\u8bbe\u7f6e\u6743\u9650\nsudo mkdir -p \/usr\/local\/php\/var\/{run,log}\nsudo chown -R nginx:nginx \/usr\/local\/php\/var\nsudo chmod -R 755 \/usr\/local\/php\/var\n# \u914d\u7f6ephp-fpm\u670d\u52a1\nsudo nano \/usr\/lib\/systemd\/system\/php-fpm.service # \u521b\u5efa\u670d\u52a1\u6587\u4ef6\n#\u5c06\u4ee5\u4e0b\u5185\u5bb9\u590d\u5236\u5230\u6587\u4ef6\u91cc\n&#91;Unit]\nDescription=PHP FastCGI Process Manager\nAfter=syslog.target network.target\n\n&#91;Service]\nType=simple\nPIDFile=\/run\/php-fpm.pid\nExecStart=\/usr\/local\/php\/sbin\/php-fpm --nodaemonize --fpm-config \/usr\/local\/php\/etc\/php-fpm.conf\nExecReload=\/bin\/kill -USR2 $MAINPID\n\n&#91;Install]\nWantedBy=multi-user.target\n# \u4ee5\u4e0a\u4e3a\u6587\u4ef6\u5185\u5bb9, \u6309 Ctrl + X\uff0c\u518d\u6309Y\uff0c\u518d\u6309\u56de\u8f66\u4fdd\u5b58\u5e76\u9000\u51fa\n# \u91cd\u542f PHP-FPM\nsudo systemctl daemon-reload   # \u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\uff08\u521a\u624d\u7684service\u6587\u4ef6\uff09\nsudo systemctl start php-fpm   # \u542f\u52a8php-fpm\nsudo systemctl enable php-fpm  # \u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u542f\u52a8\nsudo systemctl status php-fpm  # \u67e5\u770bphp-fpm\u8fd0\u884c\u72b6\u6001\uff0c\u51fa\u73b0active (running)\u8868\u793a\u6b63\u5728\u8fd0\u884c<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b89\u88c5 MySQL 5.7<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5378\u8f7dmariadb\uff08\u5982\u679c\u5b58\u5728\uff0cmariadb\u4f1a\u548cmysql\u51b2\u7a81\uff09\n# \u67e5\u770bmariadb\u662f\u5426\u5b58\u5728\nrpm -qa | grep mariadb\n# \u8f93\u51fa\u4ee5\u4e0b\u5185\u5bb9\u8bf4\u660emariadb\u5b58\u5728\nmariadb-common-10.3.39-1.p02.ky10.x86_64\nmariadb-errmessage-10.3.39-1.p02.ky10.x86_64\nmariadb-10.3.39-1.p02.ky10.x86_64\nmariadb-connector-c-3.0.6-9.ky10.x86_64\nmariadb-server-10.3.39-1.p02.ky10.x86_64\n# \u5378\u8f7d\u547d\u4ee4\nsudo rpm -e --nodeps \\\n    mariadb-server \\\n    mariadb \\\n    mariadb-common \\\n    mariadb-connector-c \\\n    mariadb-errmessage\n# \u6e05\u7406\u6b8b\u7559\u6587\u4ef6\u548c\u76ee\u5f55\nsudo rm -rf \/var\/lib\/mysql\/             # \u6570\u636e\u76ee\u5f55\nsudo rm -f \/etc\/my.cnf \/etc\/my.cnf.d\/*  # \u914d\u7f6e\u6587\u4ef6\nsudo rm -f \/var\/log\/mariadb.log         # \u65e5\u5fd7\u6587\u4ef6\n# \u8fdb\u5165mysql\u5b89\u88c5\u5305\u76ee\u5f55\ncd \/opt\/lnmp\/mysql\n# \u6309\u987a\u5e8f\u5b89\u88c5 MySQL \u7ec4\u4ef6\nrpm -ivh mysql-community-common-5.7*.rpm\nrpm -ivh mysql-community-libs-5.7*.rpm\nrpm -ivh mysql-community-client-5.7*.rpm\nrpm -ivh mysql-community-server-5.7*.rpm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6emysql<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start mysqld  # \u542f\u52a8mysql,\u9700\u8981\u7b49\u5f85\u4e00\u70b9\u65f6\u95f4\nsudo systemctl enable mysqld # \u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u542f\u52a8\nsudo systemctl status mysqld # \u67e5\u770bmysql\u8fd0\u884c\u72b6\u6001\uff0c\u51fa\u73b0active (running)\u8868\u793a\u6b63\u5728\u8fd0\u884c\n# \u83b7\u53d6\u4e34\u65f6\u5bc6\u7801\uff0c\u590d\u5236\u4e00\u4e0b\uff0c\u4e0b\u9762\u767b\u5f55\u9700\u8981\u7528\u5230\nsudo grep 'temporary password' \/var\/log\/mysqld.log\n# \u68c0\u67e5\u7248\u672c\nmysql --version\n# \u5e94\u8f93\u51fa\uff1amysql  Ver 14.14 Distrib 5.7.40\n\n# \u767b\u5f55\u6d4b\u8bd5\nmysql -u root -p  # \u4f7f\u7528\u8fd9\u4e2a\u547d\u4ee4\uff0c\u56de\u8f66\uff0c\u9700\u8981\u7c98\u8d34\u521a\u624d\u7684\u4e34\u65f6\u5bc6\u7801\n# \u9996\u6b21\u4fee\u6539\u5bc6\u7801\nALTER USER 'root'@'localhost' IDENTIFIED BY '7E25b972@192b01004b62346ee9975A5';\n# \u7b2c\u4e8c\u6b21\u53ca\u4ee5\u540e\u4fee\u6539\u5bc6\u7801\nUPDATE mysql.user SET authentication_string=PASSWORD('7E25b972@192b01004b62346ee9975A5') WHERE User='root';\n# \u5237\u65b0\u8868\u6570\u636e\nFLUSH PRIVILEGES;\n# \u6309Ctrl + D \u9000\u51fa\u540e\u91cd\u65b0\u8fdb\u5165\uff0c\u770b\u770b\u5bc6\u7801\u4fee\u6539\u6709\u6ca1\u6709\u751f\u6548\n# \u8fdb\u5165\u6570\u636e\u5e93\u547d\u4ee4\u884c\nmysql -u root -p # \u56de\u8f66\uff0c\u9700\u8981\u8f93\u5165\u4e0a\u9762\u65b0\u7684\u5bc6\u7801\uff087E25b972@192b01004b62346ee9975A5\uff09\n# \u521b\u5efa\u6570\u636e\u5e93\nCREATE DATABASE db_wind;\n# \u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff0c\u9700\u8981\u5148\u9000\u51fa\u6570\u636e\u5e93\u547d\u4ee4\u884c\uff0c\u6309Ctrl + D\nmysql -u root -p db_wind &lt; \/opt\/lnmp\/db_wind.sql # \u56de\u8f66\uff0c\u9700\u8981\u8f93\u5165\u4e0a\u9762\u65b0\u7684\u5bc6\u7801\uff087E25b972@192b01004b62346ee9975A5\uff09\n\n# \u91cd\u542f\u670d\u52a1\uff08\u53ef\u9009\uff09\nsudo systemctl restart mysqld<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b89\u88c5Alisql\uff08PolarDB\u5185\u6838\uff09<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fdb\u5165\u76ee\u5f55\ncd \/opt\/lnmp\/alisql_deps\n# \u5b89\u88c5\u4f9d\u8d56\nsudo rpm -Uvh --force --nodeps *.rpm\n# \u7f16\u8bd1\u548c\u5b89\u88c5\n# \u786e\u4fdd\u5728 \/opt\/lnmp\/AliSQL\u76ee\u5f55\u4e0b\ncd \/opt\/lnmp\/AliSQL\n# \u521b\u5efa\u6587\u4ef6\u5939\nmkdir build\n\u8fdb\u5165\u6587\u4ef6\u5939\ncd \/opt\/lnmp\/AliSQL\/build\n# \u68c0\u67e5\ncmake .. -DCMAKE_INSTALL_PREFIX=\/usr\/local\/alisql \\\n         -DMYSQL_DATADIR=\/usr\/local\/alisql\/data \\\n         -DSYSCONFDIR=\/etc \\\n         -DWITH_INNOBASE_STORAGE_ENGINE=1 \\\n         -DWITH_PARTITION_STORAGE_ENGINE=1 \\\n         -DWITH_FEDERATED_STORAGE_ENGINE=1 \\\n         -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \\\n         -DWITH_MYISAM_STORAGE_ENGINE=1 \\\n         -DENABLED_LOCAL_INFILE=1 \\\n         -DWITH_SSL=system \\\n         -DWITH_ZLIB=system\n# \u5982\u679c\u62a5\u9519\u627e\u4e0d\u5230 -lstdc++\uff0c\u624b\u52a8\u521b\u5efa\u7b26\u53f7\u94fe\u63a5\nsudo ln -sv \/usr\/lib64\/libstdc++.so.6 \/usr\/lib64\/libstdc++.so\n# \u68c0\u67e5\u94fe\u63a5\u662f\u5426\u6307\u5411\u6b63\u786e\u7248\u672c\nls -l \/usr\/lib64\/libstdc++.so*\n# \u7f16\u8bd1\nmake -j$(nproc)\n# \u5b89\u88c5\nsudo make install\n\n# \u5982\u679cmariadb\u5df2\u7ecf\u542f\u52a8\uff0c\u4f1a\u5360\u75283306\u7aef\u53e3\uff0c\u5148\u505c\u6b62\nsudo systemctl stop mariadb # \u505c\u6b62mariadb\u8fd0\u884c\nsudo systemctl disable mariadb # \u505c\u6b62mariadb\u5f00\u673a\u542f\u52a8\n# \u521d\u59cb\u5316\u6570\u636e\u5e93\nsudo scripts\/mysql_install_db --basedir=\/usr\/local\/alisql --datadir=\/usr\/local\/alisql\/data --user=$(whoami)\n\n# \u542f\u52a8alisql\n\/usr\/local\/alisql\/bin\/mysqld_safe --defaults-file=\/usr\/local\/alisql\/my.cnf &amp;\n# \u542f\u52a8\u5b8c\u6210\u6309Ctrl + C\u9000\u51fa\uff0c\n\n# \u4fee\u6539root\u7528\u6237\u7684\u5bc6\u7801\n# \u8f93\u5165\u547d\u4ee4\uff0c\u56de\u8f66\uff08\u521d\u59cb\u5bc6\u7801\u4e3a\u7a7a\uff0c\u6309\u56de\u8f66\u76f4\u63a5\u8fdb\u5165\u6570\u636e\u5e93\u547d\u4ee4\u884c\uff09\n\/usr\/local\/alisql\/bin\/mysql -u root -p\n# \u4fee\u6539\u5bc6\u7801\uff08\u4fee\u6539\u4e3a123456\uff09\nSET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');\n# \u5237\u65b0\u8868\u6570\u636e\nFLUSH PRIVILEGES;\n# \u8fdb\u5165\u6570\u636e\u5e93\u547d\u4ee4\u884c\n\/usr\/local\/alisql\/bin\/mysql -u root -p\uff0c# \u56de\u8f66\uff0c\u9700\u8981\u8f93\u5165\u4e0a\u9762\u65b0\u7684\u5bc6\u7801\n# \u521b\u5efa\u6570\u636e\u5e93\nCREATE DATABASE db_wind;\n# \u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff0c\u9700\u8981\u5148\u9000\u51fa\u6570\u636e\u5e93\u547d\u4ee4\u884c\uff0c\u6309Ctrl + D\n\/usr\/local\/alisql\/bin\/mysql -u root -p db_wind &lt; \/opt\/lnmp\/db_wind.sql\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u90e8\u7f72\u7ad9\u70b9<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5c06\u4ee3\u7801\u590d\u5236\u5230\/usr\/local\/nginx\/html\u76ee\u5f55\u4e0b\nsudo cp -rp \/opt\/lnmp\/wind \/usr\/local\/nginx\/html\/\n#\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\nsudo chmod -R 777 \/usr\/local\/nginx\/html\/wind\/storage\nsudo chmod -R 777 \/usr\/local\/nginx\/html\/wind\/bootstrap\nsudo chmod 777 \/usr\/local\/nginx\/html\/wind\/storage\/app\/script\/module1\nsudo chmod 777 \/usr\/local\/nginx\/html\/wind\/storage\/app\/script\/module2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">nginx\u914d\u7f6e<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u6253\u5f00nginx\u914d\u7f6e\u6587\u4ef6\nsudo nano \/usr\/local\/nginx\/conf\/nginx.conf\n# \u5728http\u4ee3\u7801\u5757\u91cc\u52a0\u4e0a\uff1a\uff08http\u4ee3\u7801\u5757\u53ef\u4ee5\u6709\u591a\u4e2ainclude\uff09\nhttp {\n    # ... \u5176\u4ed6\u73b0\u6709\u914d\u7f6e ...\n\n    include \/usr\/local\/nginx\/conf\/vhosts\/*.conf;\n}\n# \u521b\u5efa\u76ee\u5f55\u5b58\u653e\u7ad9\u70b9\u7684nginx\u914d\u7f6e\u6587\u4ef6\nsudo mkdir -p \/usr\/local\/nginx\/conf\/vhosts\n# \u521b\u5efa\u5e76\u7f16\u8f91\u6587\u4ef6\nsudo nano \/usr\/local\/nginx\/conf\/vhosts\/wind.conf\n# \u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\uff0c192.168.24.133\u662f\u670d\u52a1\u5668\u5185\u7f51ip\uff0c\u6539\u6210\u5b9e\u9645\u5730\u5740\nserver {\n    listen 192.168.24.133:80;\n    server_name _;\n    root \/usr\/local\/nginx\/html\/wind\/public;\n    index index.php index.html;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ \\.php$ {\n        fastcgi_pass   127.0.0.1:9000;\n        fastcgi_index  index.php;\n        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        include        fastcgi_params;\n        fastcgi_connect_timeout 3600;\n        fastcgi_send_timeout 3600;\n        fastcgi_read_timeout 3600;\n    }\n\n    access_log  \/usr\/local\/nginx\/logs\/wind.log;\n    error_log   \/usr\/local\/nginx\/logs\/wind.log;\n}\n# \u6d4b\u8bd5\u914d\u7f6e\u662f\u5426\u6b63\u786e\nnginx -t\n# \u51fa\u73b0\u4ee5\u4e0b\u5185\u5bb9\u8bf4\u660enginx\u914d\u7f6e\u6b63\u786e\nnginx: the configuration file \/usr\/local\/nginx\/conf\/nginx.conf syntax is ok\nnginx: configuration file \/usr\/local\/nginx\/conf\/nginx.conf test is successful\n# \u91cd\u542fnginx\nsystemctl reload nginx\n#\u53ef\u80fd\u9700\u8981\u5f00\u542f80\u7aef\u53e3\n# \u67e5\u770b\u9632\u706b\u5899\u72b6\u6001\nsudo systemctl status firewalld\n# \u653e\u884c 80 \u7aef\u53e3\nsudo firewall-cmd --add-port=80\/tcp --permanent\n# \u91cd\u542f\u9632\u706b\u5899\nsudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>php\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u65b0\u5efaphp.ini\u6587\u4ef6\nsudo nano \/usr\/local\/php\/etc\/php.ini\n# \u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\nmax_execution_time = 3600    ; \u8868\u793a\u6700\u5927\u6267\u884c\u65f6\u95f4\u4e3a 3600 \u79d2\uff0c\u4e5f\u5c31\u662f 1 \u5c0f\u65f6\nmax_input_time = 3600        ; \u8868\u793a\u6700\u5927\u8f93\u5165\u65f6\u95f4\u4e3a 3600 \u79d2\uff0c\u4e5f\u5c31\u662f 1 \u5c0f\u65f6\nmemory_limit = 1024M         ; \u9002\u5f53\u52a0\u5927\u5185\u5b58\u9650\u5236\uff0c\u9632\u6b62\u5185\u5b58\u4e0d\u8db3\nupload_max_filesize = 100M   ; \u6839\u636e\u9700\u8981\u8c03\u6574\u4e0a\u4f20\u5927\u5c0f\npost_max_size = 100M         ; \u4fdd\u6301\u548c\u4e0a\u4f20\u5927\u5c0f\u4e00\u81f4\u6216\u66f4\u5927\n# \u91cd\u542fphp\nsudo systemctl restart php-fpm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b89\u88c5supervisor\u5b88\u62a4\u8fdb\u7a0b<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fdb\u5165\u5b89\u88c5\u6587\u4ef6\u8def\u5f84\ncd \/opt\/lnmp\/supervisor\n# \u5b89\u88c5pip\uff08\u7cfb\u7edf\u5df2\u6709python3.7\u73af\u5883\uff0c\u65e0\u9700\u5b89\u88c5\uff09\npython3 get-pip.py --no-index --find-links=.\n# \u67e5\u770bpip\u662f\u5426\u5b89\u88c5\u6210\u529f\npip3 --version # \u51fa\u73b0\u7248\u672c\u53f7\u8bf4\u660e\u5b89\u88c5\u6210\u529f\n# \u5b89\u88c5 setuptools\npip3 install --no-index --find-links=. setuptools-68.0.0-py3-none-any.whl\n# \u5b89\u88c5meld3\npip3 install --no-index --find-links=. meld3-2.0.1-py2.py3-none-any.whl\n# \u5b89\u88c5 Supervisor\npip3 install --no-index --find-links=. supervisor-4.2.5-py2.py3-none-any.whl\n# \u67e5\u770bSupervisor\u662f\u5426\u5b89\u88c5\u6210\u529f\nsupervisord --version # \u51fa\u73b0\u7248\u672c\u53f7\u8bf4\u660e\u5b89\u88c5\u6210\u529f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6esupervisor<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u751f\u6210\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\necho_supervisord_conf > \/etc\/supervisord.conf\n# \u6253\u5f00 supervisord.conf\nsudo nano \/etc\/supervisord.conf\n# \u627e\u5230\u4ee5\u4e0b\u4e24\u884c\uff0c\u5728\u6700\u540e\n;&#91;include]\n;files = relative\/path\/to\/*.ini\n# \u6539\u6210\u4ee5\u4e0b\u5185\u5bb9\n&#91;include]\nfiles = \/etc\/supervisor\/conf.d\/*.conf\n# \u6309ctrl + X\uff0c\u7136\u540e\u6309Y\uff0c\u5173\u95ed\u6587\u4ef6\n# \u521b\u5efa\u9879\u76ee\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\nsudo mkdir -p \/etc\/supervisor\/conf.d\n# \u65b0\u5efa\u5e76\u6253\u5f00\u9879\u76ee\u914d\u7f6e\u6587\u4ef6\nsudo nano \/etc\/supervisor\/conf.d\/wind.conf\n# \u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\n&#91;program:wind]\n# \u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\uff0c\u786e\u4fdd\u547d\u4ee4\u53ef\u6267\u884c\ncommand=\/usr\/local\/php\/bin\/php \/usr\/local\/nginx\/html\/wind\/artisan queue:work --sleep=3 --tries=3 --timeout=60\nprocess_name=%(program_name)s_%(process_num)02d\ndirectory=\/usr\/local\/nginx\/html\/wind  # \u6dfb\u52a0\u5de5\u4f5c\u76ee\u5f55\nnumprocs=1\nautostart=true\nautorestart=true\nstartretries=3\nuser=nginx\nredirect_stderr=true\nstdout_logfile=\/usr\/local\/nginx\/html\/wind\/storage\/logs\/worker.log\nstdout_logfile_maxbytes=10MB\nstdout_logfile_backups=5\nstopwaitsecs=60\nenvironment=HOME=\"\/usr\/local\/nginx\/html\/wind\",USER=\"nginx\"\n# \u6309ctrl + X\uff0c\u7136\u540e\u6309Y\uff0c\u5173\u95ed\u6587\u4ef6\n# \u542f\u52a8 Supervisor \u5e76\u52a0\u8f7d\u914d\u7f6e\uff0c\u4ee5\u4e0b4\u4e2a\u547d\u4ee4\u4f9d\u6b21\u6267\u884c\n# \u542f\u52a8 supervisord \u4e3b\u8fdb\u7a0b\uff0c\u5e76\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\nsupervisord -c \/etc\/supervisord.conf     \n# \u544a\u8bc9 supervisorctl \u68c0\u67e5\u662f\u5426\u6709\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\u88ab\u6dfb\u52a0           \nsupervisorctl -c \/etc\/supervisord.conf reread\n# \u5e94\u7528\u4e0a\u4e00\u6b65 reread \u53d1\u73b0\u7684\u65b0\u914d\u7f6e\uff0c\u5e76\u542f\u52a8\u65b0\u7a0b\u5e8f        \nsupervisorctl -c \/etc\/supervisord.conf update     \n# \u542f\u52a8 &#91;program:wind] \u5b9a\u4e49\u7684\u6240\u6709\u961f\u5217\u8fdb\u7a0b   \nsupervisorctl -c \/etc\/supervisord.conf start wind:*  \n# \u8bbe\u7f6e systemd \u81ea\u542f\u52a8\u670d\u52a1\nsudo nano \/etc\/systemd\/system\/supervisord.service # \u521b\u5efa\u670d\u52a1\u6587\u4ef6\n#\u5c06\u4ee5\u4e0b\u5185\u5bb9\u590d\u5236\u5230\u6587\u4ef6\u91cc\n&#91;Unit]\nDescription=Supervisor process control system\nDocumentation=http:\/\/supervisord.org\nAfter=network.target\n\n&#91;Service]\nType=simple  # \u5173\u952e\uff1a\u6539\u4e3a simple\nExecStart=\/usr\/local\/bin\/supervisord -c \/etc\/supervisord.conf -n  # \u6dfb\u52a0 -n \u53c2\u6570\nExecStop=\/usr\/local\/bin\/supervisorctl -c \/etc\/supervisord.conf shutdown\nExecReload=\/usr\/local\/bin\/supervisorctl -c \/etc\/supervisord.conf reload\nKillMode=mixed\nRestart=on-failure\nRestartSec=5s\nUser=root\n\n&#91;Install]\nWantedBy=multi-user.target\n# \u4ee5\u4e0a\u4e3a\u6587\u4ef6\u5185\u5bb9, \u6309 Ctrl + X\uff0c\u518d\u6309Y\uff0c\u518d\u6309\u56de\u8f66\u4fdd\u5b58\u5e76\u9000\u51fa\n# \u542f\u7528 Supervisor \u5f00\u673a\u81ea\u542f\nsystemctl daemon-reexec        # \u91cd\u65b0\u542f\u52a8systemd\u7684\u4e3b\u8fdb\u7a0b\nsystemctl daemon-reload        # \u91cd\u65b0\u52a0\u8f7d\u6240\u6709\u7684systemd\u5355\u5143\u914d\u7f6e\nsystemctl enable supervisord   # \u8bbe\u7f6esupervisord\u5f00\u673a\u81ea\u542f\u52a8\nsystemctl start supervisord    # \u7acb\u5373\u542f\u52a8 supervisord \u670d\u52a1\n\n# \u5982\u679c\u663e\u793afailed\uff0c\u4f7f\u7528systemctl restart supervisord \u91cd\u65b0\u542f\u52a8supervisord \u670d\u52a1\n# \u91cd\u542f\u7cfb\u7edf\u540e\u5982\u679c\u670d\u52a1\u8d77\u4e0d\u6765\uff0c\u8981\u5148\u4f7f\u7528\u5173\u95ed\u547d\u4ee4\uff1a\n\/usr\/local\/bin\/supervisorctl -c \/etc\/supervisord.conf shutdown\n# \u7136\u540e\u5220\u9664sock\u6587\u4ef6\uff1a\nsudo rm \/tmp\/supervisor.sock\n# \u624d\u80fd\u4f7f\u7528systemctl \u542f\u52a8\nsystemctl start supervisord       # \u7acb\u5373\u542f\u52a8 supervisord \u670d\u52a1\nsystemctl is-active supervisord      # \u67e5\u770b supervisord \u670d\u52a1\u662f\u5426\u542f\u52a8\uff0c\u663e\u793aactive\u8868\u793a\u542f\u52a8\n\n# \u5982\u679c\u4ec5\u4fee\u6539\u4e86\u961f\u5217\u4ee3\u7801\uff08\u4e1a\u52a1\u4ee3\u7801\uff09\n# \u65e0\u9700\u91cd\u542f Supervisor \u4e3b\u8fdb\u7a0b\uff0c\u53ea\u9700\u91cd\u542f\u5bf9\u5e94\u7684\u5b50\u8fdb\u7a0b\uff1a\n# \u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\uff08\u786e\u4fdd Supervisor \u611f\u77e5\u5230\u53d8\u5316\uff09\nsupervisorctl -c \/etc\/supervisord.conf reread\n# \u91cd\u542f\u7279\u5b9a\u7a0b\u5e8f\uff08\u5982 wind \u7ec4\u4e0b\u7684\u6240\u6709\u8fdb\u7a0b\uff09\nsupervisorctl -c \/etc\/supervisord.conf restart wind:*\n# \u5982\u679c\u4fee\u6539\u4e86 Supervisor \u914d\u7f6e\u6587\u4ef6\uff08\/etc\/supervisord.conf \u6216\u5b50\u914d\u7f6e\uff09\n# \u9700\u8981 \u91cd\u542f Supervisor \u4e3b\u8fdb\u7a0b \u4ee5\u52a0\u8f7d\u65b0\u914d\u7f6e\uff1a\n# \u5148\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u662f\u5426\u6b63\u786e\nsupervisord -c \/etc\/supervisord.conf --check\n# \u91cd\u542f Supervisor \u4e3b\u8fdb\u7a0b\uff08\u4e24\u79cd\u65b9\u5f0f\u4efb\u9009\u5176\u4e00\uff09\nsudo systemctl restart supervisord   # \u63a8\u8350\uff1a\u901a\u8fc7 systemd \u7ba1\u7406\n# \u6216\nsupervisorctl -c \/etc\/supervisord.conf shutdown  # \u5148\u505c\u6b62\nsupervisord -c \/etc\/supervisord.conf            # \u518d\u542f\u52a8\n# \u5982\u679c\u540c\u65f6\u4fee\u6539\u4e86\u4ee3\u7801\u548c\u914d\u7f6e\u6587\u4ef6\uff0c\u6309\u987a\u5e8f\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n# 1. \u91cd\u542f Supervisor \u4e3b\u8fdb\u7a0b\uff08\u52a0\u8f7d\u65b0\u914d\u7f6e\uff09\nsudo systemctl restart supervisord\n# 2. \u91cd\u542f\u5b50\u8fdb\u7a0b\uff08\u52a0\u8f7d\u65b0\u4ee3\u7801\uff09\nsupervisorctl -c \/etc\/supervisord.conf restart wind:*<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5176\u4ed6\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u521b\u5efa\u6a21\u5757\u4e00\u548c\u6a21\u5757\u4e8c\u8ba1\u7b97\u7ed3\u679c\u5bfc\u51faexcel\u76ee\u5f55\uff08\u5fc5\u987b\u521b\u5efa\uff0c\u5426\u5219\u4f1a\u62a5\u9519\uff09\nmkdir -p \/data\/excel\n# \u6dfb\u52a0\u6743\u9650\nsudo chmod -R 777 \/data\/excel\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u901a\u8fc7\u6570\u636e\u5e93\u5de5\u5177\u8fde\u63a5\u6570\u636e\u5e93<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u7b2c\u4e00\u6b65\uff1a\u653e\u884c 3306 \u7aef\u53e3\nsudo firewall-cmd --add-port=3306\/tcp --permanent\n# \u7b2c\u4e00\u6b65\uff1a\u91cd\u542f\u9632\u706b\u5899\nsudo firewall-cmd --reload\n# \u7b2c\u4e09\u6b65\uff1a\uff087E25b972@192b01004b62346ee9975A5\uff09\nmysql -u root -p\n# \u7b2c\u56db\u6b65\uff1a\u8f93\u5165\nuse mysql;\n# \u7b2c\u4e94\u6b65\uff1a\u8f93\u5165\nupdate user set host = '%' where user = 'root';\n# \u7b2c\u516d\u6b65\uff1a\u8f93\u5165\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u642d\u5efapython3.12\u811a\u672c\u6253\u5305\u73af\u5883<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4e0b\u8f7d Python 3.12\ncd \/usr\/local\/src\nsudo wget https:\/\/www.python.org\/ftp\/python\/3.12.3\/Python-3.12.3.tgz\n# \u6216\u8005\u4f7f\u7528\u672c\u5730\u4e0b\u8f7d\u597d\u7684\u6587\u4ef6\nsudo cp \/opt\/lnmp\/Python-3.12.3.tgz \/usr\/local\/src\/\n# \u89e3\u538b\u6587\u4ef6\u5939\nsudo tar -xzf Python-3.12.3.tgz\ncd Python-3.12.3\n# \u7f16\u8bd1\u5b89\u88c5python3.12\n.\/configure --enable-shared --enable-optimizations\nmake -j$(nproc)\nsudo make altinstall\n# \u6dfb\u52a0\u5171\u4eab\u5e93\u8def\u5f84\u5230\u7cfb\u7edf\u914d\u7f6e\uff08\u6c38\u4e45\u751f\u6548\uff09\necho \"\/usr\/local\/lib\" | sudo tee \/etc\/ld.so.conf.d\/python312.conf\n# \u66f4\u65b0\u7cfb\u7edf\u7684\u5171\u4eab\u5e93\u7f13\u5b58\uff0c\u786e\u4fdd\u65b0\u5b89\u88c5\u7684\u5e93\u80fd\u88ab\u52a8\u6001\u94fe\u63a5\u5668\u6b63\u786e\u627e\u5230\nsudo ldconfig\n# \u9a8c\u8bc1 Python 3.12 \u5b89\u88c5\u6210\u529f\n\/usr\/local\/bin\/python3.12 --version   # \u5e94\u8f93\u51fa Python 3.12.3\n# \u521b\u5efapython3.12\u865a\u62df\u73af\u5883\ncd \/\n\/usr\/local\/bin\/python3.12 -m venv venv312\n# \u6fc0\u6d3b\u865a\u62df\u73af\u5883\nsource venv312\/bin\/activate\n# \u6c38\u4e45\u914d\u7f6e\u56fd\u5185\u6e90\nmkdir -p ~\/.pip  # \u521b\u5efa.pip\u76ee\u5f55\necho \"&#91;global]\nindex-url = https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\ntrusted-host = pypi.tuna.tsinghua.edu.cn\" &gt; ~\/.pip\/pip.conf\n# \u5b89\u88c5python\u5305\npip3 install pyinstaller deap numpy pandas scipy pyscipopt openpyxl pymysql\n# \u6253\u5305\u811a\u672c \npyinstaller --onefile module1.py\npyinstaller --onefile module2.py\n# \u9000\u51fa\u865a\u62df\u73af\u5883\ndeactivate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6eipv6<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u7f51\u5361<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4e34\u65f6\u6d4b\u8bd5\nip -6 addr add fd00:1234:5678::10\/64 dev ens33\n\n# \u6c38\u4e45\u751f\u6548\uff1a\n# \u6253\u5f00\u7f51\u5361\u914d\u7f6e\u6587\u4ef6\nsudo nano \/etc\/sysconfig\/network-scripts\/ifcfg-ens33\n# \u6dfb\u52a0\u4ee5\u4e0bipv6\u914d\u7f6e\u5185\u5bb9\nIPV6INIT=yes\nIPV6ADDR=fd00:1234:5678::10\/64\nIPV6_AUTOCONF=no\n# \u91cd\u542f\u7f51\u5361\nsudo systemctl restart NetworkManager<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fee\u6539nginx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    # \u76d1\u542c IPv4\n    listen 192.168.24.133:80;\n\n    # \u76d1\u542c\u6240\u6709 IPv6 \uff08\u5fc5\u987b\u65b9\u62ec\u53f7\uff09\n    listen &#91;::]:80;\n\n    server_name _;\n\n    root \/usr\/local\/nginx\/html\/wind\/public;\n    index index.php index.html;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ \\.php$ {\n        fastcgi_pass   127.0.0.1:9000;\n        fastcgi_index  index.php;\n        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        include        fastcgi_params;\n        fastcgi_connect_timeout 3600;\n        fastcgi_send_timeout 3600;\n        fastcgi_read_timeout 3600;\n    }\n\n    access_log  \/usr\/local\/nginx\/logs\/wind.log;\n    error_log   \/usr\/local\/nginx\/logs\/wind.log;\n}\n# \u67e5\u770bnginx\u914d\u7f6e\u8bed\u6cd5\u662f\u5426\u6b63\u786e\nsudo \/usr\/local\/nginx\/sbin\/nginx -t\n# \u91cd\u542fnginx\nsudo systemctl restart nginx\n# \u67e5\u770b\u7aef\u53e3\u76d1\u542c\nsudo ss -tuln | grep 80<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6ce8\u610f\uff1a\u4f7f\u7528nat\u6a21\u5f0f\u8fde\u63a5\u865a\u62df\u673a\uff0c\u53ea\u80fd\u5728\u865a\u62df\u673a\u91cc\u4f7f\u7528ipv6\uff0c\u5bbf\u4e3b\u673a\u65e0\u6cd5\u4f7f\u7528ipv6\u8bbf\u95ee\u865a\u62df\u673a\u91cc\u7684\u7ad9\u70b9\uff01\uff01\uff01<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u671f\u51c6\u5907 \u4f7f\u7528FTP\u5de5\u5177\u5c06\u6240\u6709\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u590d\u5236\u5230\u670d\u52a1\u5668\/opt\u76ee\u5f55 \u5b89\u88c5nginx1.24 \u7f16\u8bd1 Nginx  [&hellip;]<\/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":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":234,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/posts\/262\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/note.yuncrown.com\/index.php\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}