{"id":103700,"date":"2026-09-11T08:26:07","date_gmt":"2026-09-11T00:26:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/103700.html"},"modified":"2026-09-11T08:26:07","modified_gmt":"2026-09-11T00:26:07","slug":"centos-stream-9-%e4%bb%8e%e9%9b%b6%e6%90%ad%e5%bb%ba-lamp-%e7%8e%af%e5%a2%83%e5%ae%8c%e6%95%b4%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/103700.html","title":{"rendered":"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357"},"content":{"rendered":"<p>\u672c\u6587\u57fa\u4e8e\u771f\u5b9e\u64cd\u4f5c\u6d41\u7a0b\u6574\u7406&#xff0c;\u5b8c\u6574\u8bb0\u5f55 CentOS Stream 9 \u7cfb\u7edf\u4e0b LAMP&#xff08;Linux &#043; Apache &#043; MariaDB &#043; PHP&#xff09;\u73af\u5883\u7684\u642d\u5efa\u5168\u8fc7\u7a0b&#xff0c;\u5305\u542b\u6362\u6e90\u8e29\u5751\u3001\u6570\u636e\u5e93\u914d\u7f6e\u3001\u6743\u9650\u5904\u7406\u3001\u8fdc\u7a0b\u8fde\u63a5\u9a8c\u8bc1\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u65e2\u9002\u5408\u7f51\u9875\u5f00\u53d1\u73af\u5883\u642d\u5efa&#xff0c;\u4e5f\u53ef\u4f5c\u4e3a Web \u6f0f\u6d1e\u9776\u573a\u7684\u57fa\u7840\u73af\u5883\u3002<\/p>\n<h3>\u4e00\u3001\u73af\u5883\u4e0e\u51c6\u5907<\/h3>\n<h4>1.1 \u9002\u7528\u573a\u666f<\/h4>\n<ul>\n<li>\n<p>\u672c\u5730\u865a\u62df\u673a\u642d\u5efa Web \u5b66\u4e60\u4e0e\u5f00\u53d1\u73af\u5883<\/p>\n<\/li>\n<li>\n<p>\u90e8\u7f72 SQL \u6ce8\u5165\u3001XSS \u7b49\u7ecf\u5178 Web \u6f0f\u6d1e\u9776\u573a<\/p>\n<\/li>\n<li>\n<p>\u7ec3\u4e60 Linux \u670d\u52a1\u5668\u8fd0\u7ef4\u4e0e PHP \u5168\u6808\u5f00\u53d1<\/p>\n<\/li>\n<\/ul>\n<h4>1.2 \u7cfb\u7edf\u4e0e\u5de5\u5177<\/h4>\n<table>\n<tr>\u7c7b\u522b\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u670d\u52a1\u5668\u7cfb\u7edf<\/td>\n<td>CentOS Stream 9<\/td>\n<\/tr>\n<tr>\n<td>\u5305\u7ba1\u7406\u5668<\/td>\n<td>dnf&#xff08;yum \u4e3a\u8f6f\u94fe\u63a5\u517c\u5bb9&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u672c\u5730\u5de5\u5177<\/td>\n<td>VS Code&#xff08;\u8fdc\u7a0b\u5f00\u53d1&#xff09;\u3001Navicat&#xff08;\u6570\u636e\u5e93\u7ba1\u7406&#xff09;\u3001Chrome\/Edge \u6d4f\u89c8\u5668<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u7edc\u6a21\u5f0f<\/td>\n<td>\u6865\u63a5\u6a21\u5f0f&#xff0c;\u865a\u62df\u673a\u4e0e\u7269\u7406\u673a\u540c\u5c40\u57df\u7f51\u53ef\u76f4\u63a5\u4e92\u8bbf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.3 \u6838\u5fc3\u8bf4\u660e<\/h4>\n<p>CentOS 9 \u9ed8\u8ba4\u81ea\u5e26 PHP 8.x \u7248\u672c&#xff0c;\u5bf9 DVWA\u3001SQLi-Labs \u7b49\u7ecf\u5178\u8001\u65e7\u9776\u573a\u517c\u5bb9\u6027\u8f83\u5dee&#xff0c;\u56e0\u6b64\u6211\u4eec\u624b\u52a8\u5b89\u88c5 PHP 7.4 \u7248\u672c&#xff1b;\u6570\u636e\u5e93\u91c7\u7528 MariaDB&#xff0c;\u4e0e MySQL \u5b8c\u5168\u534f\u8bae\u517c\u5bb9&#xff0c;\u547d\u4ee4\u3001\u7aef\u53e3\u3001\u9a71\u52a8\u901a\u7528\u3002<\/p>\n<\/p>\n<h3>\u4e8c\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e<\/h3>\n<h4>2.1 \u5207\u6362 root \u6743\u9650<\/h4>\n<p>\u6240\u6709\u7cfb\u7edf\u7ea7\u914d\u7f6e\u5747\u9700 root \u6743\u9650&#xff0c;\u666e\u901a\u7528\u6237\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5207\u6362&#xff1a;<\/p>\n<p>su &#8211; root<\/p>\n<p>\u8f93\u5165 root \u5bc6\u7801\u540e&#xff0c;\u63d0\u793a\u7b26\u53d8\u4e3a # \u5373\u4e3a\u6210\u529f\u3002<\/p>\n<h4>2.2 \u5173\u95ed SELinux<\/h4>\n<p>SELinux \u662f CentOS \u7684\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236\u673a\u5236&#xff0c;\u9ed8\u8ba4\u5f00\u542f\u4f1a\u62e6\u622a Apache \u5bf9\u7f51\u9875\u6587\u4ef6\u7684\u8bfb\u53d6&#xff0c;\u6781\u6613\u9020\u6210 403 \u9519\u8bef&#xff0c;\u9776\u573a\u5b66\u4e60\u73af\u5883\u5efa\u8bae\u6c38\u4e45\u5173\u95ed\u3002<\/p>\n<li>\n<p>\u4e34\u65f6\u5173\u95ed&#xff08;\u7acb\u5373\u751f\u6548&#xff0c;\u91cd\u542f\u5931\u6548&#xff09;<\/p>\n<\/li>\n<p>setenforce 0<\/p>\n<li>\n<p>\u6c38\u4e45\u5173\u95ed&#xff08;\u91cd\u542f\u540e\u751f\u6548&#xff09; \u7f16\u8f91\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<\/li>\n<p>vi \/etc\/selinux\/config<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"357\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002555-6aa34a931b856.png\" width=\"1143\" \/><\/p>\n<p>\u5c06 SELINUX&#061;enforcing \u4fee\u6539\u4e3a&#xff1a;<\/p>\n<p>SELINUX&#061;disabled<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"804\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002555-6aa34a937146d.png\" width=\"1731\" \/><\/p>\n<p>\u4fdd\u5b58\u9000\u51fa\u540e\u6267\u884c reboot \u91cd\u542f\u7cfb\u7edf\u3002<\/p>\n<p>&#xff01;\u65b0\u624b\u63d0\u793a&#xff1a;vi \u7f16\u8f91\u5668\u6309 i \u8fdb\u5165\u7f16\u8f91\u6a21\u5f0f&#xff0c;\u4fee\u6539\u5b8c\u6309 Esc&#xff0c;\u8f93\u5165 :wq \u56de\u8f66\u4fdd\u5b58\u9000\u51fa&#xff1b;\u8f93\u9519\u4e86\u6309 Esc \u8f93\u5165 :q! \u5f3a\u5236\u9000\u51fa\u4e0d\u4fdd\u5b58\u3002<\/p>\n<h4>2.3 \u8f6f\u4ef6\u6e90\u6362\u6e90\u8e29\u5751\u4e0e\u5904\u7406<\/h4>\n<p>\u56fd\u5185\u7f51\u7edc\u4e0b&#xff0c;\u5b98\u65b9\u6e90\u4e0b\u8f7d\u901f\u5ea6\u8f83\u6162&#xff0c;\u901a\u5e38\u4f1a\u66ff\u6362\u4e3a\u963f\u91cc\u4e91\u7b49\u56fd\u5185\u955c\u50cf\u6e90&#xff0c;\u4f46\u5b9e\u9645\u64cd\u4f5c\u4e2d\u5bb9\u6613\u51fa\u73b0\u7248\u672c\u8def\u5f84\u4e0d\u5339\u914d\u7684\u95ee\u9898\u3002<\/p>\n<h5>\u8e29\u5751\u8fc7\u7a0b<\/h5>\n<p>\u6267\u884c curl \u4e0b\u8f7d\u963f\u91cc\u4e91 CentOS Stream 9 \u6e90\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>curl -o \/etc\/yum.repos.d\/CentOS-Stream-BaseOS.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-Stream-9-BaseOS.repo<br \/>\ncurl -o \/etc\/yum.repos.d\/CentOS-Stream-AppStream.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-Stream-9-AppStream.repo<\/p>\n<p>\u6267\u884c dnf makecache \u5237\u65b0\u7f13\u5b58\u65f6\u51fa\u73b0\u8b66\u544a&#xff1a;<\/p>\n<p>\u8b66\u544a&#xff1a;\u52a0\u8f7d &#039;\/etc\/yum.repos.d\/CentOS-Stream-AppStream.repo&#039; \u5931\u8d25&#xff0c;\u8df3\u8fc7\u3002<br \/>\n\u8b66\u544a&#xff1a;\u52a0\u8f7d &#039;\/etc\/yum.repos.d\/CentOS-Stream-BaseOS.repo&#039; \u5931\u8d25&#xff0c;\u8df3\u8fc7\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"567\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002556-6aa34a9482409.png\" width=\"2166\" \/><\/p>\n<h5>\u539f\u56e0\u4e0e\u89e3\u51b3\u65b9\u6848<\/h5>\n<p>\u539f\u56e0\u662f\u963f\u91cc\u4e91\u955c\u50cf\u8def\u5f84\u66f4\u65b0&#xff0c;\u65e7\u6a21\u677f\u4e2d\u7684\u53d8\u91cf\u89e3\u6790\u5931\u6548&#xff0c;\u5bfc\u81f4\u6e90\u5730\u5740\u65e0\u6548\u3002\u5bf9\u4e8e\u4e00\u6b21\u6027\u642d\u5efa\u73af\u5883\u7684\u573a\u666f&#xff0c;\u6700\u7b80\u65b9\u6848\u662f\u5220\u9664\u5931\u6548\u6e90&#xff0c;\u7ee7\u7eed\u4f7f\u7528\u7cfb\u7edf\u9ed8\u8ba4\u5b98\u65b9\u6e90&#xff1a;<\/p>\n<p>rm -f \/etc\/yum.repos.d\/CentOS-Stream-BaseOS.repo<br \/>\nrm -f \/etc\/yum.repos.d\/CentOS-Stream-AppStream.repo<br \/>\ndnf makecache<\/p>\n<p>\u6267\u884c\u540e\u65e0\u62a5\u9519&#xff0c;\u5143\u6570\u636e\u7f13\u5b58\u5efa\u7acb\u6210\u529f&#xff0c;\u540e\u7eed\u5b89\u88c5\u53ef\u6b63\u5e38\u8fdb\u884c\u3002<\/p>\n<p>&#xff01;\u5982\u679c\u9700\u8981\u957f\u671f\u4f7f\u7528\u3001\u9891\u7e41\u5b89\u88c5\u8f6f\u4ef6&#xff0c;\u53ef\u4ee5\u624b\u52a8\u5199\u5165\u56fa\u5b9a\u8def\u5f84\u7684\u963f\u91cc\u4e91\u6e90\u914d\u7f6e&#xff1b;\u4ec5\u642d\u5efa\u4e00\u6b21\u9776\u573a\u73af\u5883&#xff0c;\u9ed8\u8ba4\u6e90\u5b8c\u5168\u591f\u7528\u3002<\/p>\n<\/p>\n<h3>\u4e09\u3001\u5b89\u88c5 PHP 7.4 \u8f6f\u4ef6\u6e90<\/h3>\n<h4>3.1 \u4e3a\u4ec0\u4e48\u9009\u62e9 PHP 7.4<\/h4>\n<p>\u7edd\u5927\u591a\u6570\u7ecf\u5178 Web \u6f0f\u6d1e\u9776\u573a\u5f00\u53d1\u4e8e PHP 5.x\/7.x \u65f6\u4ee3&#xff0c;\u9ad8\u7248\u672c PHP \u4f1a\u5e9f\u5f03\u5927\u91cf\u65e7\u8bed\u6cd5&#xff0c;\u5bfc\u81f4\u9776\u573a\u529f\u80fd\u5f02\u5e38\u3001\u6f0f\u6d1e\u65e0\u6cd5\u590d\u73b0\u3002Remi \u6e90\u662f\u4e1a\u5185\u6700\u6210\u719f\u7684 PHP \u591a\u7248\u672c\u7ba1\u7406\u6e90\u3002<\/p>\n<h4>3.2 \u5b89\u88c5 EPEL \u4e0e Remi \u6e90<\/h4>\n<p>dnf install -y epel-release<br \/>\ndnf install -y https:\/\/rpms.remirepo.net\/enterprise\/remi-release-9.rpm<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"902\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002557-6aa34a958e0d2.png\" width=\"1902\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"396\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002558-6aa34a96a1b82.png\" width=\"1422\" \/><\/p>\n<h4>3.3 \u5207\u6362 PHP \u7248\u672c\u4e3a 7.4<\/h4>\n<p>\u91cd\u7f6e\u7cfb\u7edf\u9ed8\u8ba4 PHP \u6a21\u5757&#xff0c;\u542f\u7528 Remi \u6e90\u7684 PHP 7.4&#xff1a;<\/p>\n<p>dnf module reset php -y<br \/>\ndnf module enable php:remi-7.4 -y<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"195\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002559-6aa34a9700eb3.png\" width=\"1392\" \/><\/p>\n<\/p>\n<h3>\u56db\u3001\u4e00\u952e\u5b89\u88c5 LAMP \u5168\u6808<\/h3>\n<h4>4.1 \u7ec4\u4ef6\u8bf4\u660e<\/h4>\n<table>\n<tr>\u7ec4\u4ef6\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>openssh-server<\/td>\n<td>SSH \u670d\u52a1&#xff0c;\u652f\u6301\u8fdc\u7a0b\u547d\u4ee4\u884c\u4e0e VS Code \u8fdc\u7a0b\u5f00\u53d1<\/td>\n<\/tr>\n<tr>\n<td>httpd<\/td>\n<td>Apache \u7f51\u9875\u670d\u52a1\u5668&#xff0c;\u5904\u7406 HTTP \u8bf7\u6c42<\/td>\n<\/tr>\n<tr>\n<td>mariadb-server<\/td>\n<td>MariaDB \u6570\u636e\u5e93\u670d\u52a1&#xff0c;\u5b58\u50a8\u7f51\u7ad9\u4e0e\u9776\u573a\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>mariadb<\/td>\n<td>\u6570\u636e\u5e93\u5ba2\u6237\u7aef\u547d\u4ee4\u884c\u5de5\u5177<\/td>\n<\/tr>\n<tr>\n<td>php<\/td>\n<td>PHP \u811a\u672c\u89e3\u6790\u5668<\/td>\n<\/tr>\n<tr>\n<td>php-mysqlnd<\/td>\n<td>PHP \u8fde\u63a5\u6570\u636e\u5e93\u7684\u9a71\u52a8\u6269\u5c55<\/td>\n<\/tr>\n<tr>\n<td>php-gd \/ php-mbstring \/ php-curl<\/td>\n<td>\u9776\u573a\u5e38\u7528\u529f\u80fd\u4f9d\u8d56\u6269\u5c55<\/td>\n<\/tr>\n<tr>\n<td>unzip\u3001wget<\/td>\n<td>\u4e0b\u8f7d\u89e3\u538b\u9776\u573a\u6e90\u7801\u5de5\u5177<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.2 \u6267\u884c\u5b89\u88c5<\/h4>\n<p>dnf install -y openssh-server httpd mariadb-server mariadb php php-mysqlnd php-gd php-mbstring php-curl php-xml php-zip unzip wget<\/p>\n<p>\u7b49\u5f85\u547d\u4ee4\u6267\u884c\u5b8c\u6210&#xff0c;\u65e0\u62a5\u9519\u5373\u4e3a\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"327\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002559-6aa34a9733bf6.png\" width=\"1959\" \/><\/p>\n<\/p>\n<h3>\u4e94\u3001\u670d\u52a1\u7ba1\u7406\u4e0e\u5f00\u673a\u81ea\u542f<\/h3>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u540c\u65f6\u5b8c\u6210\u300c\u7acb\u5373\u542f\u52a8\u300d\u548c\u300c\u5f00\u673a\u81ea\u542f\u300d&#xff1a;<\/p>\n<p>systemctl enable &#8211;now sshd<br \/>\nsystemctl enable &#8211;now httpd<br \/>\nsystemctl enable &#8211;now mariadb<\/p>\n<p>\u8f93\u51fa Created symlink \u5373\u4e3a\u8bbe\u7f6e\u6210\u529f&#xff0c;\u53ef\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u8fd0\u884c\u72b6\u6001&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"258\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002559-6aa34a9799758.png\" width=\"1638\" \/><\/p>\n<p>systemctl status httpd<br \/>\nsystemctl status mariadb<\/p>\n<p>\u663e\u793a active (running) \u4ee3\u8868\u670d\u52a1\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<h3>\u516d\u3001\u9632\u706b\u5899\u7aef\u53e3\u914d\u7f6e<\/h3>\n<p>CentOS 9 \u9ed8\u8ba4\u542f\u7528 firewalld \u9632\u706b\u5899&#xff0c;\u9700\u624b\u52a8\u653e\u884c\u5bf9\u5e94\u7aef\u53e3&#xff0c;\u5426\u5219\u5916\u90e8\u65e0\u6cd5\u8bbf\u95ee\u7f51\u9875\u548c\u6570\u636e\u5e93\u3002<\/p>\n<p># \u653e\u884c SSH 22\u7aef\u53e3<br \/>\nfirewall-cmd &#8211;permanent &#8211;add-service&#061;ssh<br \/>\n# \u653e\u884c HTTP 80\u7aef\u53e3<br \/>\nfirewall-cmd &#8211;permanent &#8211;add-service&#061;http<br \/>\n# \u653e\u884c\u6570\u636e\u5e93 3306\u7aef\u53e3<br \/>\nfirewall-cmd &#8211;permanent &#8211;add-port&#061;3306\/tcp<br \/>\n# \u91cd\u8f7d\u89c4\u5219\u4f7f\u914d\u7f6e\u751f\u6548<br \/>\nfirewall-cmd &#8211;reload<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"288\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002600-6aa34a982ffc7.png\" width=\"1170\" \/><\/p>\n<p>&#xff01; &#8211;permanent \u8868\u793a\u6c38\u4e45\u751f\u6548&#xff0c;\u91cd\u542f\u9632\u706b\u5899\u4e0d\u4e22\u5931&#xff1b;\u4e0d\u52a0\u8be5\u53c2\u6570\u4ec5\u4e34\u65f6\u751f\u6548&#xff0c;\u91cd\u542f\u540e\u5931\u6548\u3002<\/p>\n<\/p>\n<h3>\u4e03\u3001\u7f51\u7ad9\u76ee\u5f55\u6743\u9650\u914d\u7f6e<\/h3>\n<p>Apache \u9ed8\u8ba4\u4ee5 apache \u7528\u6237\u8eab\u4efd\u8fd0\u884c&#xff0c;\u82e5\u7f51\u9875\u6587\u4ef6\u6240\u6709\u8005\u4e3a root&#xff0c;\u4f1a\u51fa\u73b0 403 \u7981\u6b62\u8bbf\u95ee\u9519\u8bef\u3002<\/p>\n<p># \u8bbe\u7f6e\u76ee\u5f55\u6240\u6709\u8005\u4e3a apache \u7528\u6237\u7ec4<br \/>\nchown -R apache:apache \/var\/www\/html<br \/>\n# \u8bbe\u7f6e\u76ee\u5f55\u6743\u9650\u4e3a 755<br \/>\nchmod -R 755 \/var\/www\/html<\/p>\n<p>Apache \u9ed8\u8ba4\u7f51\u7ad9\u6839\u76ee\u5f55\u4e3a \/var\/www\/html&#xff0c;\u6240\u6709\u7f51\u9875\u3001PHP \u6587\u4ef6\u3001\u9776\u573a\u6e90\u7801\u90fd\u5fc5\u987b\u653e\u5728\u8be5\u76ee\u5f55\u4e0b&#xff0c;\u624d\u80fd\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<h3>\u516b\u3001MariaDB \u6570\u636e\u5e93\u521d\u59cb\u5316\u4e0e\u8fdc\u7a0b\u6388\u6743<\/h3>\n<h4>8.1 \u6267\u884c\u5b89\u5168\u521d\u59cb\u5316\u811a\u672c<\/h4>\n<p>MariaDB \u5b89\u88c5\u5b8c\u6210\u540e root \u9ed8\u8ba4\u65e0\u5bc6\u7801&#xff0c;\u6267\u884c\u5b89\u5168\u521d\u59cb\u5316\u811a\u672c\u8fdb\u884c\u57fa\u7840\u914d\u7f6e&#xff1a;<\/p>\n<p>mysql_secure_installation<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"432\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002600-6aa34a989614d.png\" width=\"1353\" \/><\/p>\n<h5>\u4ea4\u4e92\u6b65\u9aa4\u4e0e\u63a8\u8350\u9009\u9879<\/h5>\n<li>\n<p>Enter current password for root (enter for none): \u76f4\u63a5\u56de\u8f66&#xff0c;\u521d\u59cb\u65e0\u5bc6\u7801<\/p>\n<\/li>\n<li>\n<p>Switch to unix_socket authentication [Y\/n] \u8f93\u5165 n&#xff0c;\u4f7f\u7528\u4f20\u7edf\u5bc6\u7801\u767b\u5f55<\/p>\n<\/li>\n<li>\n<p>Change the root password? [Y\/n]<\/p>\n<p>\u8f93\u5165 Y&#xff0c;\u8bbe\u7f6e\u6570\u636e\u5e93 root \u5bc6\u7801<\/p>\n<p>\u8e29\u5751\u63d0\u793a&#xff1a;Linux \u7ec8\u7aef\u8f93\u5165\u5bc6\u7801\u65f6\u4e0d\u4f1a\u663e\u793a\u4efb\u4f55\u5b57\u7b26&#xff0c;\u5c5e\u4e8e\u76f2\u6253&#xff0c;\u4e24\u6b21\u8f93\u5165\u5fc5\u987b\u5b8c\u5168\u4e00\u81f4&#xff0c;\u5426\u5219\u4f1a\u63d0\u793a passwords do not match\u3002\u9776\u573a\u5b66\u4e60\u5efa\u8bae\u8bbe\u7f6e\u7b80\u5355\u5bc6\u7801\u5982 123456\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"240\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002601-6aa34a99059d0.png\" width=\"1233\" \/><\/li>\n<li>\n<p>Remove anonymous users? [Y\/n] \u8f93\u5165 Y&#xff0c;\u5220\u9664\u533f\u540d\u7528\u6237<\/p>\n<\/li>\n<li>\n<p>Disallow root login remotely? [Y\/n] \u8f93\u5165 n&#xff0c;\u5141\u8bb8 root \u8fdc\u7a0b\u767b\u5f55&#xff08;Navicat \u8fdc\u7a0b\u8fde\u63a5\u9700\u8981&#xff09;<\/p>\n<\/li>\n<li>\n<p>Remove test database and access to it? [Y\/n] \u8f93\u5165 Y&#xff0c;\u5220\u9664\u6d4b\u8bd5\u5e93<\/p>\n<\/li>\n<li>\n<p>Reload privilege tables now? [Y\/n] \u8f93\u5165 Y&#xff0c;\u5237\u65b0\u6743\u9650\u7acb\u5373\u751f\u6548<\/p>\n<\/li>\n<p>\u51fa\u73b0 Thanks for using MariaDB! \u5373\u4e3a\u521d\u59cb\u5316\u5b8c\u6210\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"177\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002601-6aa34a9944710.png\" width=\"1014\" \/><\/p>\n<h4>8.2 \u5f00\u542f root \u8d26\u53f7\u8fdc\u7a0b\u8bbf\u95ee\u6743\u9650<\/h4>\n<p>\u521d\u59cb\u5316\u9ed8\u8ba4\u4ec5\u5141\u8bb8\u672c\u5730\u767b\u5f55\u6570\u636e\u5e93&#xff0c;\u9700\u624b\u52a8\u6388\u6743\u4efb\u610f IP \u8bbf\u95ee&#xff1a;<\/p>\n<li>\n<p>\u767b\u5f55\u6570\u636e\u5e93\u547d\u4ee4\u884c<\/p>\n<\/li>\n<p>mysql -uroot -p<\/p>\n<p>\u8f93\u5165\u6570\u636e\u5e93 root \u5bc6\u7801&#xff0c;\u51fa\u73b0 MariaDB [(none)]&gt; \u63d0\u793a\u7b26\u5373\u4e3a\u767b\u5f55\u6210\u529f\u3002<\/p>\n<li>\n<p>\u6267\u884c\u6388\u6743 SQL<\/p>\n<\/li>\n<p>GRANT ALL PRIVILEGES ON *.* TO &#039;root&#039;&#064;&#039;%&#039; IDENTIFIED BY &#039;123456&#039;;<br \/>\nFLUSH PRIVILEGES;<br \/>\nexit;<\/p>\n<ul>\n<li>\n<p>*.* \u4ee3\u8868\u6240\u6709\u5e93\u6240\u6709\u8868<\/p>\n<\/li>\n<li>\n<p>&#039;root&#039;&#064;&#039;%&#039; \u4ee3\u8868 root \u8d26\u53f7\u53ef\u4ece\u4efb\u610f IP \u767b\u5f55<\/p>\n<\/li>\n<li>\n<p>\u5bc6\u7801\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u8bbe\u7f6e\u7684\u6570\u636e\u5e93 root \u5bc6\u7801<\/p>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"459\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002601-6aa34a9969805.png\" width=\"1263\" \/><\/p>\n<\/p>\n<h3>\u4e5d\u3001\u8fdc\u7a0b\u5de5\u5177\u8fde\u63a5\u9a8c\u8bc1<\/h3>\n<h4>9.1 \u83b7\u53d6\u865a\u62df\u673a IP<\/h4>\n<p>\u6267\u884c\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668 IP&#xff1a;<\/p>\n<p>ip a<\/p>\n<p>\u627e\u5230\u7f51\u5361&#xff08;\u901a\u5e38\u4e3a ens33&#xff09;\u4e0b\u7684 inet \u5730\u5740&#xff0c;\u4f8b\u5982 192.168.6.132&#xff0c;\u540e\u7eed\u6240\u6709\u8bbf\u95ee\u90fd\u4f7f\u7528\u8be5 IP\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"456\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002601-6aa34a99ce4d0.png\" width=\"1503\" \/><\/p>\n<h4>9.2 Naicat \u8fdc\u7a0b\u8fde\u63a5\u6570\u636e\u5e93<\/h4>\n<p>\u6253\u5f00 Navicat&#xff0c;\u65b0\u5efa\u8fde\u63a5&#xff0c;\u9009\u62e9 MySQL \u7c7b\u578b&#xff08;MariaDB \u5b8c\u5168\u517c\u5bb9&#xff0c;\u9009 MySQL \u5373\u53ef&#xff09;&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1014\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002602-6aa34a9a3b4d5.png\" width=\"1386\" \/><\/p>\n<ul>\n<li>\n<p>\u4e3b\u673a\u540d&#xff1a;192.168.6.132<\/p>\n<\/li>\n<li>\n<p>\u7aef\u53e3&#xff1a;3306<\/p>\n<\/li>\n<li>\n<p>\u7528\u6237\u540d&#xff1a;root<\/p>\n<\/li>\n<li>\n<p>\u5bc6\u7801&#xff1a;\u6570\u636e\u5e93 root \u5bc6\u7801<\/p>\n<\/li>\n<\/ul>\n<p>\u70b9\u51fb\u6d4b\u8bd5\u8fde\u63a5&#xff0c;\u63d0\u793a\u8fde\u63a5\u6210\u529f\u540e\u4fdd\u5b58&#xff0c;\u5373\u53ef\u56fe\u5f62\u5316\u7ba1\u7406\u6570\u636e\u5e93\u3001\u67e5\u770b\u8868\u6570\u636e\u3001\u6267\u884c SQL\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1059\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002602-6aa34a9aab466.png\" width=\"1299\" \/><\/p>\n<h4>9.3 \u6d4f\u89c8\u5668\u6d4b\u8bd5\u7f51\u9875\u670d\u52a1<\/h4>\n<p>\u8bbf\u95ee http:\/\/192.168.6.132&#xff0c;\u51fa\u73b0 CentOS \u9ed8\u8ba4\u7684 Apache \u6d4b\u8bd5\u9875\u9762&#xff0c;\u8bf4\u660e\u7f51\u9875\u670d\u52a1\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1086\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002603-6aa34a9b21b9a.png\" width=\"2394\" \/><\/p>\n<\/p>\n<h3>\u5341\u3001\u5168\u94fe\u8def\u529f\u80fd\u9a8c\u8bc1<\/h3>\n<h4>10.1 \u9a8c\u8bc1 PHP \u89e3\u6790<\/h4>\n<p>\u521b\u5efa PHP \u63a2\u9488\u6587\u4ef6&#xff1a;<\/p>\n<p>echo &#039;&lt;?php phpinfo(); ?&gt;&#039; &gt; \/var\/www\/html\/phpinfo.php<\/p>\n<p>\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/192.168.6.132\/phpinfo.php&#xff0c;\u51fa\u73b0 PHP \u4fe1\u606f\u8be6\u60c5\u9875&#xff0c;\u8bf4\u660e PHP \u89e3\u6790\u6b63\u5e38&#xff0c;\u53ef\u67e5\u770b PHP \u7248\u672c\u3001\u5df2\u5b89\u88c5\u6269\u5c55\u7b49\u4fe1\u606f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"579\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002605-6aa34a9d51733.png\" width=\"2172\" \/><\/p>\n<h4>10.2 \u9a8c\u8bc1 PHP \u6570\u636e\u5e93\u67e5\u8be2<\/h4>\n<p>\u521b\u5efa\u6d4b\u8bd5\u6570\u636e\u5e93\u4e0e\u6d4b\u8bd5\u8868&#xff0c;\u9a8c\u8bc1 PHP \u5230\u6570\u636e\u5e93\u7684\u5b8c\u6574\u94fe\u8def&#xff1a;<\/p>\n<li>\n<p>\u6570\u636e\u5e93\u5185\u521b\u5efa\u6d4b\u8bd5\u5e93\u4e0e\u6d4b\u8bd5\u6570\u636e<\/p>\n<\/li>\n<p>CREATE DATABASE IF NOT EXISTS test DEFAULT CHARSET utf8mb4;<br \/>\nUSE test;<br \/>\n\u200b<br \/>\nCREATE TABLE users (<br \/>\n \u00a0  id INT AUTO_INCREMENT PRIMARY KEY,<br \/>\n \u00a0  username VARCHAR(50) NOT NULL,<br \/>\n \u00a0  password VARCHAR(50) NOT NULL,<br \/>\n \u00a0  email VARCHAR(100)<br \/>\n);<br \/>\n\u200b<br \/>\nINSERT INTO users (username, password, email) VALUES<br \/>\n(&#039;admin&#039;, &#039;admin123&#039;, &#039;admin&#064;test.com&#039;),<br \/>\n(&#039;user1&#039;, &#039;pass123&#039;, &#039;user1&#064;test.com&#039;),<br \/>\n(&#039;user2&#039;, &#039;123456&#039;, &#039;user2&#064;test.com&#039;);<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"714\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002605-6aa34a9ddc238.png\" width=\"1905\" \/><\/p>\n<li>\n<p>\u521b\u5efa PHP \u67e5\u8be2\u9875\u9762<\/p>\n<\/li>\n<p>tee \/var\/www\/html\/test_db.php &lt;&lt; &#039;EOF&#039;<br \/>\n&lt;?php<br \/>\n$host &#061; &#039;localhost&#039;;<br \/>\n$user &#061; &#039;root&#039;;<br \/>\n$pass &#061; &#039;123456&#039;;<br \/>\n$dbname &#061; &#039;test&#039;;<br \/>\n\u200b<br \/>\n$conn &#061; mysqli_connect($host, $user, $pass, $dbname);<br \/>\nif (!$conn) {<br \/>\n \u00a0  die(&#039;\u8fde\u63a5\u5931\u8d25&#xff1a;&#039; . mysqli_connect_error());<br \/>\n}<br \/>\necho &#039;&lt;h2&gt;\u221a \u6570\u636e\u5e93\u8fde\u63a5\u6210\u529f&lt;\/h2&gt;&#039;;<br \/>\n\u200b<br \/>\n$sql &#061; &#034;SELECT * FROM users&#034;;<br \/>\n$result &#061; mysqli_query($conn, $sql);<br \/>\n\u200b<br \/>\necho &#039;&lt;table border&#061;&#034;1&#034; cellpadding&#061;&#034;8&#034;&gt;&#039;;<br \/>\necho &#039;&lt;tr&gt;&lt;th&gt;ID&lt;\/th&gt;&lt;th&gt;\u7528\u6237\u540d&lt;\/th&gt;&lt;th&gt;\u5bc6\u7801&lt;\/th&gt;&lt;th&gt;\u90ae\u7bb1&lt;\/th&gt;&lt;\/tr&gt;&#039;;<br \/>\nwhile ($row &#061; mysqli_fetch_assoc($result)) {<br \/>\n \u00a0  echo &#034;&lt;tr&gt;<br \/>\n \u00a0 \u00a0 \u00a0  &lt;td&gt;{$row[&#039;id&#039;]}&lt;\/td&gt;<br \/>\n \u00a0 \u00a0 \u00a0  &lt;td&gt;{$row[&#039;username&#039;]}&lt;\/td&gt;<br \/>\n \u00a0 \u00a0 \u00a0  &lt;td&gt;{$row[&#039;password&#039;]}&lt;\/td&gt;<br \/>\n \u00a0 \u00a0 \u00a0  &lt;td&gt;{$row[&#039;email&#039;]}&lt;\/td&gt;<br \/>\n \u00a0  &lt;\/tr&gt;&#034;;<br \/>\n}<br \/>\necho &#039;&lt;\/table&gt;&#039;;<br \/>\n\u200b<br \/>\nmysqli_close($conn);<br \/>\n?&gt;<br \/>\nEOF<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"600\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002606-6aa34a9e5fba0.png\" width=\"1206\" \/><\/p>\n<p>\u6d4f\u89c8\u5668\u9a8c\u8bc1 \u8bbf\u95ee http:\/\/192.168.6.132\/test_db.php&#xff0c;\u9875\u9762\u663e\u793a\u6570\u636e\u5e93\u8fde\u63a5\u6210\u529f&#xff0c;\u4e14\u8868\u683c\u4e2d\u5b8c\u6574\u5c55\u793a 3 \u6761\u7528\u6237\u6570\u636e&#xff0c;\u4ee3\u8868 Web \u2192 PHP \u2192 \u6570\u636e\u5e93 \u6574\u6761\u94fe\u8def\u5b8c\u5168\u901a\u7545\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"659\" src=\"2026-09-11y3qeet4ujil.png\" width=\"2049\" \/><\/p>\n<h3>\u5341\u4e00\u3001\u73af\u5883\u603b\u7ed3<\/h3>\n<p>\u81f3\u6b64&#xff0c;CentOS Stream 9 \u4e0b\u7684 LAMP \u73af\u5883\u5df2\u5168\u90e8\u642d\u5efa\u5e76\u9a8c\u8bc1\u5b8c\u6210&#xff0c;\u6838\u5fc3\u72b6\u6001\u5982\u4e0b&#xff1a;<\/p>\n<p>\u221a Apache \u7f51\u9875\u670d\u52a1\u6b63\u5e38&#xff0c;80 \u7aef\u53e3\u5bf9\u5916\u53ef\u8bbf\u95ee<\/p>\n<p>\u221a PHP 7.4 \u8fd0\u884c\u6b63\u5e38&#xff0c;\u517c\u5bb9\u5404\u7c7b\u7ecf\u5178 PHP \u9776\u573a<\/p>\n<p>\u221a MariaDB \u6570\u636e\u5e93\u7a33\u5b9a\u8fd0\u884c&#xff0c;\u652f\u6301\u672c\u5730\u4e0e\u8fdc\u7a0b\u8fde\u63a5<\/p>\n<p>\u221a \u9632\u706b\u5899\u7aef\u53e3\u914d\u7f6e\u6b63\u786e&#xff0c;SSH\u3001HTTP\u3001\u6570\u636e\u5e93\u670d\u52a1\u5747\u653e\u884c<\/p>\n<p>\u221a \u6838\u5fc3\u670d\u52a1\u5168\u90e8\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/p>\n<p>\u221a \u652f\u6301 Navicat \u56fe\u5f62\u5316\u7ba1\u7406\u6570\u636e\u5e93<\/p>\n<p>\u5b89\u5168\u63d0\u793a&#xff1a;\u8be5\u73af\u5883\u4e3a\u672c\u5730\u5b66\u4e60\u7528\u9014&#xff0c;\u5305\u542b\u5f31\u53e3\u4ee4\u4e0e\u6f0f\u6d1e\u73af\u5883&#xff0c;\u7981\u6b62\u76f4\u63a5\u66b4\u9732\u5230\u516c\u7f51&#xff0c;\u907f\u514d\u88ab\u6076\u610f\u653b\u51fb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u57fa\u4e8e\u771f\u5b9e\u64cd\u4f5c\u6d41\u7a0b\u6574\u7406&#xff0c;\u5b8c\u6574\u8bb0\u5f55 CentOS Stream 9 \u7cfb\u7edf\u4e0b LAMP&#xff08;Linux  Apache  MariaDB  PHP&#xff09;\u73af\u5883\u7684\u642d\u5efa\u5168\u8fc7\u7a0b&#xff0c;\u5305\u542b\u6362\u6e90\u8e29\u5751\u3001\u6570\u636e\u5e93\u914d\u7f6e\u3001\u6743\u9650\u5904\u7406\u3001\u8fdc\u7a0b\u8fde\u63a5\u9a8c\u8bc1\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u65e2\u9002\u5408\u7f51\u9875\u5f00\u53d1\u73af\u5883\u642d\u5efa&#xff0c;\u4e5f\u53ef\u4f5c\u4e3a Web \u6f0f\u6d1e\u9776\u573a\u7684\u57fa\u7840\u73af\u5883\u3002\u4e00\u3001\u73af\u5883\u4e0e\u51c6\u59071.1 \u9002\u7528\u573a\u666f\u672c\u5730\u865a\u62df\u673a\u642d\u5efa Web \u5b66\u4e60\u4e0e\u5f00\u53d1\u73af\u5883\u90e8\u7f72 SQL \u6ce8\u5165\u3001XSS \u7b49\u7ecf\u5178 Web \u6f0f<\/p>\n","protected":false},"author":2,"featured_media":103680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,58,275,122,44],"topic":[],"class_list":["post-103700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-centos","tag-linux","tag-web","tag-122","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/103700.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u57fa\u4e8e\u771f\u5b9e\u64cd\u4f5c\u6d41\u7a0b\u6574\u7406&#xff0c;\u5b8c\u6574\u8bb0\u5f55 CentOS Stream 9 \u7cfb\u7edf\u4e0b LAMP&#xff08;Linux Apache MariaDB PHP&#xff09;\u73af\u5883\u7684\u642d\u5efa\u5168\u8fc7\u7a0b&#xff0c;\u5305\u542b\u6362\u6e90\u8e29\u5751\u3001\u6570\u636e\u5e93\u914d\u7f6e\u3001\u6743\u9650\u5904\u7406\u3001\u8fdc\u7a0b\u8fde\u63a5\u9a8c\u8bc1\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u65e2\u9002\u5408\u7f51\u9875\u5f00\u53d1\u73af\u5883\u642d\u5efa&#xff0c;\u4e5f\u53ef\u4f5c\u4e3a Web \u6f0f\u6d1e\u9776\u573a\u7684\u57fa\u7840\u73af\u5883\u3002\u4e00\u3001\u73af\u5883\u4e0e\u51c6\u59071.1 \u9002\u7528\u573a\u666f\u672c\u5730\u865a\u62df\u673a\u642d\u5efa Web \u5b66\u4e60\u4e0e\u5f00\u53d1\u73af\u5883\u90e8\u7f72 SQL \u6ce8\u5165\u3001XSS \u7b49\u7ecf\u5178 Web \u6f0f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/103700.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-11T00:26:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002555-6aa34a931b856.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/103700.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/103700.html\",\"name\":\"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-11T00:26:07+00:00\",\"dateModified\":\"2026-09-11T00:26:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/103700.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/103700.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/103700.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/103700.html","og_locale":"zh_CN","og_type":"article","og_title":"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u57fa\u4e8e\u771f\u5b9e\u64cd\u4f5c\u6d41\u7a0b\u6574\u7406&#xff0c;\u5b8c\u6574\u8bb0\u5f55 CentOS Stream 9 \u7cfb\u7edf\u4e0b LAMP&#xff08;Linux Apache MariaDB PHP&#xff09;\u73af\u5883\u7684\u642d\u5efa\u5168\u8fc7\u7a0b&#xff0c;\u5305\u542b\u6362\u6e90\u8e29\u5751\u3001\u6570\u636e\u5e93\u914d\u7f6e\u3001\u6743\u9650\u5904\u7406\u3001\u8fdc\u7a0b\u8fde\u63a5\u9a8c\u8bc1\u7b49\u5173\u952e\u73af\u8282&#xff0c;\u65e2\u9002\u5408\u7f51\u9875\u5f00\u53d1\u73af\u5883\u642d\u5efa&#xff0c;\u4e5f\u53ef\u4f5c\u4e3a Web \u6f0f\u6d1e\u9776\u573a\u7684\u57fa\u7840\u73af\u5883\u3002\u4e00\u3001\u73af\u5883\u4e0e\u51c6\u59071.1 \u9002\u7528\u573a\u666f\u672c\u5730\u865a\u62df\u673a\u642d\u5efa Web \u5b66\u4e60\u4e0e\u5f00\u53d1\u73af\u5883\u90e8\u7f72 SQL \u6ce8\u5165\u3001XSS \u7b49\u7ecf\u5178 Web \u6f0f","og_url":"https:\/\/www.wsisp.com\/helps\/103700.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-11T00:26:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260911002555-6aa34a931b856.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/103700.html","url":"https:\/\/www.wsisp.com\/helps\/103700.html","name":"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-11T00:26:07+00:00","dateModified":"2026-09-11T00:26:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/103700.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/103700.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/103700.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"CentOS Stream 9 \u4ece\u96f6\u642d\u5efa LAMP \u73af\u5883\u5b8c\u6574\u5b9e\u6218\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/103700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=103700"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/103700\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/103680"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=103700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=103700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=103700"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=103700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}