{"id":152,"date":"2024-04-25T21:28:25","date_gmt":"2024-04-25T13:28:25","guid":{"rendered":"https:\/\/ch.book2022.top\/?p=152"},"modified":"2026-04-01T15:40:11","modified_gmt":"2026-04-01T07:40:11","slug":"rocky9%e6%89%8b%e5%8a%a8%e9%83%a8%e7%bd%b2lnmp%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/txt.book2020.top\/?p=152","title":{"rendered":"Red Hat\u7cfb\u624b\u52a8\u90e8\u7f72LNMP\u73af\u5883"},"content":{"rendered":"\n<p>\u5b89\u88c5\u4f9d\u8d56\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf update &amp;&amp; dnf install automake autoconf gcc gcc-c++ git zstd zlib zlib-devel pcre pcre-devel openssl openssl-devel libxslt libxslt-devel libtool gd gd-devel make perl perl-devel tar vim nano wget<\/code><\/pre>\n\n\n\n<p><s>Centos-Stream10\u5b89\u88c5pcre pcre-devel<\/s><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/fedora\/linux\/releases\/42\/Everything\/x86_64\/os\/Packages\/p\/pcre-8.45-1.fc42.8.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/fedora\/linux\/releases\/42\/Everything\/x86_64\/os\/Packages\/p\/pcre-utf16-8.45-1.fc42.8.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/fedora\/linux\/releases\/42\/Everything\/x86_64\/os\/Packages\/p\/pcre-utf32-8.45-1.fc42.8.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/fedora\/linux\/releases\/42\/Everything\/x86_64\/os\/Packages\/p\/pcre-cpp-8.45-1.fc42.8.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/fedora\/linux\/releases\/42\/Everything\/x86_64\/os\/Packages\/p\/pcre-devel-8.45-1.fc42.8.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/leev\/ngx_http_geoip2_module.git<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/maxmind\/libmaxminddb\/releases\/download\/1.12.2\/libmaxminddb-1.12.2.tar.gz &amp;&amp; tar -zxvf libmaxminddb-1.12.2.tar.gz &amp;&amp; cd libmaxminddb-1.12.2 &amp;&amp; .\/configure<\/code><\/pre>\n\n\n\n<p><s>\u6216\u8005\u5b58\u50a8\u5e93git\u4e0b\u8f7d\u7f16\u8bd1libmaxminddb<\/s><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><s>git clone --recursive https:\/\/github.com\/maxmind\/libmaxminddb<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>cd libmaxminddb &amp;&amp; .\/bootstrap &amp;&amp; .\/configure<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>make &amp;&amp; make install &amp;&amp; ldconfig &amp;&amp; cd<\/code><\/pre>\n\n\n\n<p>\u6821\u51c6\u65f6\u95f4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -sf \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime &amp;&amp; date -R<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8f7d\/\u5b89\u88c5\/\u89e3\u538b openssl-3.5.2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -nc --no-check-certificate https:\/\/github.com\/openssl\/openssl\/releases\/download\/openssl-3.5.2\/openssl-3.5.2.tar.gz &amp;&amp; tar -zxvf openssl-3.5.2.tar.gz<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8f7d\/\u89e3\u538b nginx-1.28.0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -nc --no-check-certificate https:\/\/nginx.org\/download\/nginx-1.28.0.tar.gz &amp;&amp; tar -zxvf nginx-1.28.0.tar.gz<\/code><\/pre>\n\n\n\n<p>\u5220\u9664 nginx-1.28.0.tar.gz\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf nginx-1.28.0.tar.gz &amp;&amp; rm -rf openssl-3.5.2.tar.gz &amp;&amp; rm -rf libmaxminddb-1.12.2.tar.gz &amp;&amp; cd nginx-1.28.0<\/code><\/pre>\n\n\n\n<p>\u6dfb\u52a0\u7f16\u8bd1\u63d2\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --prefix=\/etc\/nginx \\\n    --with-threads \\\n    --with-file-aio \\\n    --with-http_ssl_module \\\n    --with-http_v2_module \\\n    --with-http_v3_module \\\n    --with-http_realip_module \\\n    --with-http_sub_module \\\n    --with-http_gzip_static_module \\\n    --with-http_auth_request_module \\\n    --with-http_secure_link_module \\\n    --with-http_stub_status_module \\\n    --with-cc-opt='-march=native -O3' \\\n    --with-stream \\\n    --with-stream_ssl_module \\\n    --with-stream_realip_module \\\n    --add-dynamic-module=..\/ngx_http_geoip2_module \\\n    --with-stream_ssl_preread_module \\\n    --with-compat \\\n    --with-openssl-opt=enable-tls1_3 \\\n    --with-openssl=..\/openssl-3.5.2<\/code><\/pre>\n\n\n\n<p>\u7f16\u8bd1\/\u5b89\u88c5 nginx-1.28.0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>\u914d\u7f6enginx-1.28.0\u670d\u52a1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat &gt;\/etc\/systemd\/system\/nginx.service &lt;&lt;EOF\n&#91;Unit]\nDescription=A high performance web server and a reverse proxy server\nDocumentation=man:nginx(8)\nAfter=network.target nss-lookup.target\n\n&#91;Service]\nType=forking\nPIDFile=\/etc\/nginx\/logs\/nginx.pid\nExecStartPre=\/etc\/nginx\/sbin\/nginx -t -q -g 'daemon on; master_process on;'\nExecStart=\/etc\/nginx\/sbin\/nginx -g 'daemon on; master_process on;'\nExecReload=\/etc\/nginx\/sbin\/nginx -g 'daemon on; master_process on;' -s reload\nExecStop=-\/sbin\/start-stop-daemon --quiet --stop --retry QUIT\/5 --pidfile \/etc\/nginx\/logs\/nginx.pid\nTimeoutStopSec=5\nKillMode=mixed\n\n&#91;Install]\nWantedBy=multi-user.target\nEOF<\/code><\/pre>\n\n\n\n<p>\u6dfb\u52a0\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/etc\/nginx\/ssl \/etc\/systemd\/system\/nginx.service.d &amp;&amp; printf \"&#91;Service]\\nExecStartPost=\/bin\/sleep 0.1\\n\" &gt; \/etc\/systemd\/system\/nginx.service.d\/override.conf<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8f7d<a href=\"https:\/\/github.com\/P3TERX\/GeoLite.mmdb\/raw\/download\/GeoLite2-Country.mmdb\">GeoLite2-Country\u6570\u636e<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -P \/etc\/nginx\/GeoLite2 https:\/\/raw.githubusercontent.com\/P3TERX\/GeoLite.mmdb\/download\/GeoLite2-Country.mmdb<\/code><\/pre>\n\n\n\n<p>\u8fd4\u56de\u5217\u8868\u5220\u9664\u6587\u4ef6\u5939<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd &amp;&amp; rm -rf nginx-1.28.0 openssl-3.5.2 ngx_http_geoip2_module libmaxminddb-1.12.2<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5wordpress<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/nginx\/html &amp;&amp; wget https:\/\/cn.wordpress.org\/latest-zh_CN.zip &amp;&amp; unzip latest-zh_CN.zip &amp;&amp; mv wordpress\/* \/etc\/nginx\/html &amp;&amp; rm -rf latest-zh_CN.zip wordpress &amp;&amp; cd<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5nginx\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/nginx\/conf\/nginx.conf<\/code><\/pre>\n\n\n\n<p>\u5728\u7b2c\u4e00\u884c\u6dfb\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load_module \/etc\/nginx\/modules\/ngx_stream_module.so;\nload_module \/etc\/nginx\/modules\/ngx_http_geoip2_module.so;\nuser  root;<\/code><\/pre>\n\n\n\n<p>http {<\/p>\n\n\n\n<p>\u6dfb\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>include conf.d\/default.conf;\n\t# GeoIP2 \u56fd\u5bb6\u8bc6\u522b\n\tmap $http_x_forwarded_for $clientRealIp {\n\t\t\"\" $remote_addr;\n\t\t~^(?P&lt;firstAddr>&#91;0-9\\.]+),?.*$ $firstAddr;\n\t}\n\tgeoip2 \/etc\/nginx\/GeoLite2\/GeoLite2-Country.mmdb {\n\t\tauto_reload 5m;\n\t\t$geoip2_data_country_code default=XX source=$clientRealIp country iso_code;\n\t}\n\tmap $geoip2_data_country_code $allowed_country {\n\t\tCN      yes;\n\t\tJP      yes;\n\t\tHK      yes;\n\t\tUS      yes;\n\t\tdefault no;\n\t}<\/code><\/pre>\n\n\n\n<p>server {\u4e0b\u7684<\/p>\n\n\n\n<p>location \/ {\u6dfb\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\tif ($allowed_country = no) {\n\t    return 404;\n\t}<\/code><\/pre>\n\n\n\n<p>\u6dfb\u52a0dhparam<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/ssl-config.mozilla.org\/ffdhe2048.txt &gt; \/etc\/nginx\/ssl\/dhparam<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/ssl-config.mozilla.org\/#server=nginx&amp;version=1.17.7&amp;config=intermediate&amp;openssl=1.1.1m&amp;ocsp=false&amp;guideline=5.6\">nginx\u914d\u7f6e\u751f\u6210\u5730\u5740<\/a><\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/sdhz151\/tu\/main\/nginx-01.png\" alt=\"\"\/><\/figure>\n<\/figure>\n\n\n\n<p>\u5b89\u88c5 php\uff1a<\/p>\n\n\n\n<p>\u641c\u7d22\u53ef\u4e0b\u8f7d\u7684PHP\u6a21\u5757\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module list php<\/code><\/pre>\n\n\n\n<p>\u542f\u7528PHP 8.3\u6a21\u5757\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module enable php:8.3<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5PHP \u53ca\u6269\u5c55<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install php php-fpm php-bcmath php-cli php-common php-gd php-mbstring php-mysqlnd php-pdo php-soap php-xml php-opcache -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><s>\u5b89\u88c5PHP 8.4<\/s><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-common-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-fpm-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-bcmath-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-cli-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-gd-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/remi\/x86_64\/oniguruma5php-6.9.9-2.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-mbstring-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-pdo-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-mysqlnd-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-soap-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-xml-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><s>dnf install https:\/\/rpmfind.net\/linux\/remi\/enterprise\/9\/modular\/x86_64\/php-opcache-8.4.12-1.el9.remi.x86_64.rpm<\/s><\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u68c0\u67e5\u7248\u672c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php --version<\/code><\/pre>\n\n\n\n<p>\u641c\u7d22\u53ef\u4e0b\u8f7d\u7684mariadb\u6a21\u5757<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module list mariadb<\/code><\/pre>\n\n\n\n<p>\u542f\u7528mariadb 10.11\u6a21\u5757\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf module enable php:10.11<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5 MariaDB<\/p>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cRocky9 \u57fa\u7840\u5b58\u50a8\u5e93\u4e2d\u63d0\u4f9b\u4e86 MariaDB\u3002\u73b0\u5728\u6211\u4eec\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06 MariaDB \u5b89\u88c5\u5230\u60a8\u7684\u7cfb\u7edf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install mariadb mariadb-server<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u68c0\u67e5\u7248\u672c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb --version<\/code><\/pre>\n\n\n\n<p>\u4fee\u6539\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/^user = apache\/user = nginx\/' \/etc\/php-fpm.d\/www.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/^group = apache\/group = nginx\/' \/etc\/php-fpm.d\/www.conf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>user = apache<\/li>\n\n\n\n<li>group = apache<\/li>\n\n\n\n<li>\u6539\u4e3a<\/li>\n\n\n\n<li>user = nginx<\/li>\n\n\n\n<li>group = nginx<\/li>\n<\/ul>\n\n\n\n<p>\u8d4b\u4e88html\u6587\u4ef6\u5939\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R nginx:nginx \/etc\/nginx\/html<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u73b0\u5728\u542f\u7528 PHP MariaDB\uff08\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u542f\u52a8\uff09\uff0c\u542f\u52a8 MariaDB\uff0c\u5e76\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u72b6\u6001\uff1a<\/p>\n\n\n\n<p>\u5f00\u542fphp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start php-fpm<\/code><\/pre>\n\n\n\n<p>\u5f00\u542f\u72b6\u6001\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status php-fpm<\/code><\/pre>\n\n\n\n<p>\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable php-fpm<\/code><\/pre>\n\n\n\n<p>\u91cd\u65b0\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart php-fpm<\/code><\/pre>\n\n\n\n<p>\u5f00\u542fmariadb\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start mariadb<\/code><\/pre>\n\n\n\n<p>\u5f00\u542f\u72b6\u6001\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status mariadb<\/code><\/pre>\n\n\n\n<p>\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable mariadb<\/code><\/pre>\n\n\n\n<p>\u91cd\u65b0\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart mariadb<\/code><\/pre>\n\n\n\n<p>mysql\u6216MariaDB\u5b89\u5168\u52a0\u56fa\uff1a<br>\u4f1a\u8bbe\u7f6e\u5bc6\u7801\uff0c\u754c\u97621\u76f4\u63a5\u56de\u8f66\uff0c\u5269\u7684\u90fd\u9009Y\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>root\u767b\u5f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u7684\u6570\u636e\u5e93\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>show databases;<\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u6570\u636e\u5e93\u975eroot\u7528\u6237\u540d\u5bc6\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create database wordpress; create user name@localhost identified by 'password';<\/code><\/pre>\n\n\n\n<p>\u6388\u4e88\u6743\u9650\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grant all privileges on wordpress.* to name@localhost; flush privileges;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4fee\u6539\u767b\u5f55\u5bc6\u7801\u65e0\u6548<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(\"password\");<\/code><\/pre>\n\n\n\n<p>\u9000\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<p>\u5f00\u542fBBR\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"net.core.default_qdisc=fq\" &gt;&gt; \/etc\/sysctl.conf &amp;&amp; echo \"net.ipv4.tcp_congestion_control=bbr\" &gt;&gt; \/etc\/sysctl.conf &amp;&amp; sysctl -p &amp;&amp; lsmod | grep bbr<\/code><\/pre>\n\n\n\n<p>\u52a0\u8f7d\u5355\u5143\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload<\/code><\/pre>\n\n\n\n<p>\u5f00\u542fnginx\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start nginx<\/code><\/pre>\n\n\n\n<p>\u5f00\u542f\u72b6\u6001\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status nginx<\/code><\/pre>\n\n\n\n<p>\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable nginx<\/code><\/pre>\n\n\n\n<p>\u91cd\u65b0\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nginx<\/code><\/pre>\n\n\n\n<p>\u505c\u6b62nginx\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service nginx stop<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u4f9d\u8d56\uff1a Centos-Stream10\u5b89\u88c5pcre pcre-devel \u6216\u8005\u5b58\u50a8\u5e93git\u4e0b\u8f7d\u7f16\u8bd1libm&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":3,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":240,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/240"}],"wp:attachment":[{"href":"https:\/\/txt.book2020.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/txt.book2020.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}