{"id":2873,"date":"2022-05-30T09:41:02","date_gmt":"2022-05-30T01:41:02","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=2873"},"modified":"2022-05-30T13:13:48","modified_gmt":"2022-05-30T05:13:48","slug":"chapter-20","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/chapter-20.html","title":{"rendered":"\u7b2c20\u7ae0 \u4f7f\u7528LNMP\u67b6\u6784\u90e8\u7f72\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u3002"},"content":{"rendered":"

👇\u672c\u7ae0\u8282\u5185\u5bb9\u5df2\u66f4\u65b0\uff0c\u8bf7\u5728\u7ebf\u9605\u8bfb\u6700\u65b0RHEL 8\u7248\u672c\u4e66\u7c4d 👇<\/span><\/strong><\/span><\/p>\n

https:\/\/lrxjmw.cn\/basic-learning-20.html<\/span><\/strong><\/span><\/b><\/p>\n

\u7ae0\u8282\u6982\u8ff0\uff1a<\/strong><\/span><\/div>\n

LNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u662f\u4e00\u5957\u7531Linux<\/a> + Nginx + MySQL + PHP\u7ec4\u6210\u7684\u52a8\u6001\u7f51\u7ad9\u7cfb\u7edf\u89e3\u51b3\u65b9\u6848\uff0c\u5177\u6709\u514d\u8d39\u3001\u9ad8\u6548\u3001\u6269\u5c55\u6027\u5f3a\u4e14\u8d44\u6e90\u6d88\u8017\u4f4e\u7b49\u4f18\u826f\u7279\u6027\u3002\u672c\u7ae0\u9996\u5148\u5bf9\u6bd4\u4e86\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u4e0e\u4f7f\u7528RPM\u8f6f\u4ef6\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u533a\u522b\uff0c\u7136\u540e\u8bb2\u89e3\u4e86\u5982\u4f55\u624b\u5de5\u7f16\u8bd1\u6e90\u7801\u5305\u5e76\u5b89\u88c5\u5404\u4e2a\u670d\u52a1\u7a0b\u5e8f\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Discuz! X3.2\u7248\u672c\u8bba\u575b\u7cfb\u7edf\u9a8c\u8bc1\u67b6\u6784\u73af\u5883\u3002<\/p>\n

\u672c\u7ae0\u662f\u672c\u4e66\u7684\u6700\u540e\u4e00\u7ae0\u5185\u5bb9\uff0c\u5218\u9044\u8001\u5e08\u4e0d\u4ec5\u5e0c\u671b\u5404\u4f4d\u8bfb\u8005\u5728\u5b66\u5b8c\u672c\u4e66\u4e4b\u540e\uff0c\u80fd\u591f\u987a\u5229\u627e\u5230\u6ee1\u610f\u7684\u9ad8\u85aa\u5de5\u4f5c\uff0c\u4e5f\u5e0c\u671b\u60a8\u80fd\u5229\u7528\u4e66\u4e2d\u6240\u5b66\u77e5\u8bc6\u642d\u5efa\u81ea\u5df1\u7684\u535a\u5ba2\u6216\u8bba\u575b\u7cfb\u7edf\uff0c\u5e76\u4ee5\u6b64\u4e3a\u5e73\u53f0\uff0c\u5c06\u81ea\u5df1\u5de5\u4f5c\u4e2d\u79ef\u6512\u7684Linux\u7ecf\u9a8c\u4ee5\u53ca\u6280\u5de7\u5206\u4eab\u7ed9\u66f4\u591a\u4eba\uff0c\u4e3a\u7f8e\u597d\u7684\u5f00\u6e90\u4e16\u754c\u8d21\u732e\u81ea\u5df1\u7684\u529b\u91cf\u3002See you later!<\/strong><\/p>\n

20.1 \u6e90\u7801\u5305\u7a0b\u5e8f<\/strong><\/span><\/h5>\n

\u672c\u4e66\u7b2c1\u7ae0\u4e2d\u66fe\u7ecf\u8bb2\u5230\uff0c\u5728RPM\uff08\u7ea2\u5e3d\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff09\u6280\u672f\u51fa\u73b0\u4e4b\u524d\uff0cLinux\u7cfb\u7edf\u8fd0\u7ef4\u4eba\u5458\u53ea\u80fd\u901a\u8fc7\u6e90\u7801\u5305\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\u5404\u79cd\u670d\u52a1\u7a0b\u5e8f\uff0c\u8fd9\u662f\u4e00\u4ef6\u975e\u5e38\u7e41\u7410\u4e14\u6781\u6613\u6d88\u8017\u65f6\u95f4\u4e0e\u8010\u5fc3\u7684\u4e8b\u60c5\uff1b\u800c\u4e14\u5728\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d\u7a0b\u5e8f\u65f6\u8fd8\u8981\u8003\u8651\u5230\u4e0e\u5176\u4ed6\u7a0b\u5e8f\u6216\u51fd\u6570\u5e93\u7684\u76f8\u4e92\u4f9d\u8d56\u5173\u7cfb\uff0c\u8fd9\u5c31\u8981\u6c42\u8fd0\u7ef4\u4eba\u5458\u4e0d\u4ec5\u8981\u638c\u63e1\u66f4\u591a\u7684Linux\u7cfb\u7edf\u7406\u8bba\u77e5\u8bc6\u4ee5\u53ca\u9ad8\u8d85\u7684\u5b9e\u64cd\u6280\u80fd\uff0c\u8fd8\u9700\u8981\u6709\u6781\u597d\u7684\u8010\u5fc3\u624d\u80fd\u5b89\u88c5\u597d\u4e00\u4e2a\u6e90\u7801\u8f6f\u4ef6\u5305\u3002\u8003\u8651\u5230\u672c\u4e66\u7684\u8bfb\u8005\u90fd\u662f\u521a\u5165\u95e8\u6216\u51c6\u5907\u5165\u95e8\u7684\u8fd0\u7ef4\u65b0\u4eba\uff0c\u56e0\u4e3a\u672c\u4e66\u5728\u524d\u9762\u7684\u7ae0\u8282\u4e2d\u4e00\u76f4\u90fd\u662f\u91c7\u7528Yum\u8f6f\u4ef6\u4ed3\u5e93\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u3002\u4f46\u662f\uff0c\u73b0\u5728\u4f9d\u7136\u6709\u5f88\u591a\u8f6f\u4ef6\u7a0b\u5e8f\u53ea\u6709\u6e90\u7801\u5305\u7684\u5f62\u5f0f\uff0c\u5982\u679c\u6211\u4eec\u53ea\u4f1a\u4f7f\u7528Yum\u8f6f\u4ef6\u4ed3\u5e93\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\u7a0b\u5e8f\uff0c\u5219\u9762\u5bf9\u8fd9\u4e9b\u53ea\u6709\u6e90\u7801\u5305\u7684\u8f6f\u4ef6\u7a0b\u5e8f\u65f6\uff0c\u5c06\u5145\u6ee1\u65e0\u529b\u611f\uff0c\u8981\u4e48\u9700\u8981\u7b49\u5230\u7b2c\u4e09\u65b9\u7ec4\u7ec7\u5c06\u8fd9\u4e9b\u8f6f\u4ef6\u7a0b\u5e8f\u7f16\u5199\u6210RPM\u8f6f\u4ef6\u5305\u4e4b\u540e\u518d\u884c\u4f7f\u7528\uff0c\u8981\u4e48\u5c31\u53ea\u80fd\u5bfb\u627e\u76f8\u5173\u8f6f\u4ef6\u7a0b\u5e8f\u7684\u66ff\u4ee3\u54c1\u4e86\uff08\u800c\u4e14\u66ff\u4ee3\u8f6f\u4ef6\u8fd8\u5fc5\u987b\u5177\u5907RPM\u8f6f\u4ef6\u5305\u7684\u5f62\u5f0f\uff09\u3002\u7531\u6b64\u53ef\u89c1\uff0c\u5982\u679c\u8fd0\u7ef4\u4eba\u5458\u53ea\u4f1a\u4f7f\u7528Yum\u8f6f\u4ef6\u4ed3\u5e93\u6765\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\uff0c\u5c06\u4f1a\u5f62\u6210\u77e5\u8bc6\u77ed\u677f\uff0c\u5bf9\u65e5\u540e\u7684\u8fd0\u7ef4\u5de5\u4f5c\u5e26\u6765\u4e0d\u5229\u3002<\/p>\n

\u672c\u7740\u4e0d\u80fd\u8ba9\u81ea\u5df1\u7684\u8bfb\u8005\u5728\u8fd0\u7ef4\u5de5\u4f5c\u4e2d\u5403\u4e8f\u7684\u60f3\u6cd5\uff0c\u5218\u9044\u8001\u5e08\u63a5\u4e0b\u6765\u4f1a\u8be6\u7ec6\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528\u6e90\u7801\u5305\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u3002<\/p>\n

\u5176\u5b9e\uff0c\u4f7f\u7528\u6e90\u7801\u5305\u6765\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u5177\u6709\u4e24\u4e2a\u4f18\u52bf\u3002<\/p>\n

\u6e90\u7801\u5305\u7684\u53ef\u79fb\u690d\u6027\u975e\u5e38\u597d\uff0c\u51e0\u4e4e\u53ef\u4ee5\u5728\u4efb\u4f55Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4f7f\u7528\uff0c\u800cRPM\u8f6f\u4ef6\u5305\u662f\u9488\u5bf9\u7279\u5b9a\u7cfb\u7edf\u548c\u67b6\u6784\u7f16\u5199\u7684\u6307\u4ee4\u96c6\uff0c\u5fc5\u987b\u4e25\u683c\u5730\u7b26\u5408\u6267\u884c\u73af\u5883\u624d\u80fd\u987a\u5229\u5b89\u88c5\uff08\u5373\u53ea\u4f1a\u53bb\u201c\u751f\u786c\u5730\u201d\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\uff09\u3002<\/p>\n

\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u65f6\u4f1a\u6709\u4e00\u4e2a\u7f16\u8bd1\u8fc7\u7a0b\uff0c\u56e0\u6b64\u53ef\u4ee5\u66f4\u597d\u5730\u9002\u5e94\u5b89\u88c5\u4e3b\u673a\u7684\u7cfb\u7edf\u73af\u5883\uff0c\u8fd0\u884c\u6548\u7387\u548c\u4f18\u5316\u7a0b\u5ea6\u90fd\u4f1a\u5f3a\u4e8e\u4f7f\u7528RPM\u8f6f\u4ef6\u5305\u5b89\u88c5\u7684\u670d\u52a1\u7a0b\u5e8f\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u53ef\u4ee5\u5c06\u91c7\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u65b9\u5f0f\u770b\u4f5c\u662f\u9488\u5bf9\u7cfb\u7edf\u7684\u201c\u91cf\u4f53\u88c1\u8863\u201d\u3002<\/p><\/blockquote>\n

\u4e00\u822c\u6765\u8bb2\uff0c\u5728\u5b89\u88c5\u8f6f\u4ef6\u65f6\uff0c\u5982\u679c\u80fd\u901a\u8fc7Yum\u8f6f\u4ef6\u4ed3\u5e93\u6765\u5b89\u88c5\uff0c\u5c31\u7528Yum\u65b9\u5f0f\uff1b\u53cd\u4e4b\u5219\u53bb\u5bfb\u627e\u5408\u9002\u7684RPM\u8f6f\u4ef6\u5305\u6765\u5b89\u88c5\uff1b\u5982\u679c\u662f\u5728\u6ca1\u6709\u8d44\u6e90\u53ef\u7528\uff0c\u90a3\u5c31\u53ea\u80fd\u4f7f\u7528\u6e90\u7801\u5305\u6765\u5b89\u88c5\u4e86\u3002<\/p>\n

\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u770b\u4f3c\u590d\u6742\uff0c\u5176\u5b9e\u5728\u5f52\u7eb3\u6c47\u603b\u540e\u53ea\u9700\u89814\uff5e5\u4e2a\u6b65\u9aa4\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\u3002\u5218\u9044\u8001\u5e08\u63a5\u4e0b\u6765\u4f1a\u5bf9\u6bcf\u4e00\u4e2a\u6b65\u9aa4\u8fdb\u884c\u8be6\u89e3\u3002<\/p>\n

\u9700\u8981\u63d0\u524d\u8bf4\u660e\u7684\u662f\uff0c\u5728\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u7a0b\u5e8f\u65f6\uff0c\u4f1a\u8f93\u51fa\u5927\u91cf\u7684\u8fc7\u7a0b\u4fe1\u606f\uff0c\u8fd9\u4e9b\u4fe1\u606f\u7684\u610f\u4e49\u5e76\u4e0d\u5927\uff0c\u56e0\u6b64\u672c\u7ae0\u4f1a\u7701\u7565\u8fd9\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u800c\u4e0d\u4f5c\u7279\u6b8a\u5907\u6ce8\uff0c\u8bf7\u5927\u5bb6\u5728\u5177\u4f53\u64cd\u4f5c\u65f6\u4ee5\u5b9e\u9645\u4e3a\u51c6\u3002<\/p><\/blockquote>\n

\u7b2c1\u6b65<\/strong>\uff1a\u4e0b\u8f7d\u53ca\u89e3\u538b\u6e90\u7801\u5305\u6587\u4ef6\u3002\u4e3a\u4e86\u65b9\u4fbf\u5728\u7f51\u7edc\u4e2d\u4f20\u8f93\uff0c\u6e90\u7801\u5305\u6587\u4ef6\u901a\u5e38\u4f1a\u5728\u5f52\u6863\u540e\u4f7f\u7528gzip\u6216bzip2\u7b49\u683c\u5f0f\u8fdb\u884c\u538b\u7f29\uff0c\u56e0\u6b64\u4e00\u822c\u4f1a\u5177\u6709.tar.gz\u4e0e.tar.bz2\u7684\u540e\u7f00\u3002\u8981\u60f3\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\uff0c\u5fc5\u987b\u5148\u628a\u91cc\u9762\u7684\u5185\u5bb9\u89e3\u538b\u51fa\u6765\uff0c\u7136\u540e\u518d\u5207\u6362\u5230\u6e90\u7801\u5305\u6587\u4ef6\u7684\u76ee\u5f55\u4e2d\uff1a<\/p>\n

[root@linuxprobe ~]# tar xzvf FileName.tar.gz<\/strong><\/p>\n

[root@linuxprobe ~]# cd\u00a0FileDirectory<\/p><\/blockquote>\n

\u7b2c2\u6b65<\/strong>\uff1a\u7f16\u8bd1\u6e90\u7801\u5305\u4ee3\u7801\u3002\u5728\u6b63\u5f0f\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u4e4b\u524d\uff0c\u8fd8\u9700\u8981\u4f7f\u7528\u7f16\u8bd1\u811a\u672c\u9488\u5bf9\u5f53\u524d\u7cfb\u7edf\u8fdb\u884c\u4e00\u7cfb\u5217\u7684\u8bc4\u4f30\u5de5\u4f5c\uff0c\u5305\u62ec\u5bf9\u6e90\u7801\u5305\u6587\u4ef6\u3001\u8f6f\u4ef6\u4e4b\u95f4\u53ca\u51fd\u6570\u5e93\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\u3001\u7f16\u8bd1\u5668\u3001\u6c47\u7f16\u5668\u53ca\u8fde\u63a5\u5668\u8fdb\u884c\u68c0\u67e5\u3002\u6211\u4eec\u8fd8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u6765\u8ffd\u52a0--prefix\u53c2\u6570\uff0c\u4ee5\u6307\u5b9a\u7a0d\u540e\u6e90\u7801\u5305\u7a0b\u5e8f\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u4ece\u800c\u5bf9\u670d\u52a1\u7a0b\u5e8f\u7684\u5b89\u88c5\u8fc7\u7a0b\u66f4\u52a0\u53ef\u63a7\u3002\u5f53\u7f16\u8bd1\u5de5\u4f5c\u7ed3\u675f\u540e\uff0c\u5982\u679c\u7cfb\u7edf\u73af\u5883\u7b26\u5408\u5b89\u88c5\u8981\u6c42\uff0c\u4e00\u822c\u4f1a\u81ea\u52a8\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2aMakefile\u5b89\u88c5\u6587\u4ef6\u3002<\/p>\n

[root@linuxprobe ~]# .\/configure --prefix=\/usr\/local\/program<\/p><\/blockquote>\n

\u7b2c3\u6b65<\/strong>\uff1a\u751f\u6210\u4e8c\u8fdb\u5236\u5b89\u88c5\u7a0b\u5e8f\u3002\u521a\u521a\u751f\u6210\u7684Makefile\u6587\u4ef6\u4e2d\u4f1a\u4fdd\u5b58\u6709\u5173\u7cfb\u7edf\u73af\u5883\u3001\u8f6f\u4ef6\u4f9d\u8d56\u5173\u7cfb\u548c\u5b89\u88c5\u89c4\u5219\u7b49\u5185\u5bb9\uff0c\u63a5\u4e0b\u6765\u4fbf\u53ef\u4ee5\u4f7f\u7528make\u547d\u4ee4\u6765\u6839\u636eMakefile\u6587\u4ef6\u5185\u5bb9\u63d0\u4f9b\u7684\u5408\u9002\u89c4\u5219\u7f16\u8bd1\u751f\u6210\u51fa\u771f\u6b63\u53ef\u4f9b\u7528\u6237\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u6587\u4ef6\u4e86\u3002<\/p>\n

[root@linuxprobe ~]# make<\/p><\/blockquote>\n

\u7b2c4\u6b65<\/strong>\uff1a\u8fd0\u884c\u4e8c\u8fdb\u5236\u7684\u670d\u52a1\u7a0b\u5e8f\u5b89\u88c5\u5305\u3002\u7531\u4e8e\u4e0d\u9700\u8981\u518d\u68c0\u67e5\u7cfb\u7edf\u73af\u5883\uff0c\u4e5f\u4e0d\u9700\u8981\u518d\u7f16\u8bd1\u4ee3\u7801\uff0c\u56e0\u6b64\u8fd0\u884c\u4e8c\u8fdb\u5236\u7684\u670d\u52a1\u7a0b\u5e8f\u5b89\u88c5\u5305\u5e94\u8be5\u662f\u901f\u5ea6\u6700\u5feb\u7684\u6b65\u9aa4\u3002\u5982\u679c\u5728\u6e90\u7801\u5305\u7f16\u8bd1\u9636\u6bb5\u4f7f\u7528\u4e86--prefix\u53c2\u6570\uff0c\u90a3\u4e48\u6b64\u65f6\u670d\u52a1\u7a0b\u5e8f\u5c31\u4f1a\u88ab\u5b89\u88c5\u5230\u90a3\u4e2a\u76ee\u5f55\uff0c\u5982\u679c\u6ca1\u6709\u81ea\u884c\u4f7f\u7528\u53c2\u6570\u5b9a\u4e49\u76ee\u5f55\u7684\u8bdd\uff0c\u4e00\u822c\u4f1a\u88ab\u9ed8\u8ba4\u5b89\u88c5\u5230\/usr\/local\/bin\u76ee\u5f55\u4e2d\u3002<\/p>\n

[root@linuxprobe ~]# make install<\/p><\/blockquote>\n

\u7b2c5\u6b65<\/strong>\uff1a\u6e05\u7406\u6e90\u7801\u5305\u4e34\u65f6\u6587\u4ef6\u3002\u7531\u4e8e\u5728\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u4e86\u4ee3\u7801\u7f16\u8bd1\u7684\u5de5\u4f5c\uff0c\u56e0\u6b64\u5728\u5b89\u88c5\u540e\u76ee\u5f55\u4e2d\u4f1a\u9057\u7559\u4e0b\u5f88\u591a\u4e34\u65f6\u5783\u573e\u6587\u4ef6\uff0c\u672c\u7740\u5c3d\u91cf\u4e0d\u8981\u6d6a\u8d39\u78c1\u76d8\u5b58\u50a8\u7a7a\u95f4\u7684\u539f\u5219\uff0c\u53ef\u4ee5\u4f7f\u7528make clean\u547d\u4ee4\u5bf9\u4e34\u65f6\u6587\u4ef6\u8fdb\u884c\u5f7b\u5e95\u7684\u6e05\u7406\u5de5\u4f5c\u3002<\/p>\n

[root@linuxprobe ~]# make clean<\/p><\/blockquote>\n

\u4f30\u8ba1\u6709\u8bfb\u8005\u4f1a\u6709\u7591\u95ee\uff0c\u4e3a\u4ec0\u4e48\u901a\u5e38\u662f\u5b89\u88c5\u4e00\u4e2a\u670d\u52a1\u7a0b\u5e8f\uff0c\u6e90\u7801\u5305\u7684\u7f16\u8bd1\u5de5\u4f5c\uff08configure\uff09\u4e0e\u751f\u6210\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5de5\u4f5c\uff08make\uff09\u4f1a\u4f7f\u7528\u8fd9\u4e48\u957f\u7684\u65f6\u95f4\uff0c\u800c\u91c7\u7528RPM\u8f6f\u4ef6\u5305\u5b89\u88c5\u5c31\u7279\u522b\u6709\u6548\u7387\u5462\uff1f\u5176\u5b9e\u539f\u56e0\u5f88\u7b80\u5355\uff0c\u5728RHCA\u8ba4\u8bc1\u7684RH401\u8003\u8bd5\u4e2d\uff0c\u4f1a\u8981\u6c42\u8003\u751f\u5199\u4e00\u4e2aRPM\u8f6f\u4ef6\u5305\u3002\u5218\u9044\u8001\u5e08\u4f1a\u5728\u672c\u4e66\u7684\u8fdb\u9636\u7bc7\u4e2d\u8bb2\u5230\uff0c\u5176\u5b9eRPM\u8f6f\u4ef6\u5305\u5c31\u662f\u628a\u8f6f\u4ef6\u7684\u6e90\u7801\u5305\u548c\u4e00\u4e2a\u9488\u5bf9\u7279\u5b9a\u7cfb\u7edf\u3001\u67b6\u6784\u3001\u73af\u5883\u7f16\u5199\u7684\u5b89\u88c5\u89c4\u5b9a\u6253\u5305\u6210\u4e00\u8d77\u7684\u6307\u4ee4\u96c6\uff0c\u56e0\u6b64\u4e3a\u4e86\u8ba9\u7528\u6237\u90fd\u80fd\u4f7f\u7528\u8fd9\u4e2a\u8f6f\u4ef6\u5305\u6765\u5b89\u88c5\u7a0b\u5e8f\uff0c\u901a\u5e38\u4e00\u4e2a\u8f6f\u4ef6\u7a0b\u5e8f\u4f1a\u53d1\u5e03\u591a\u79cd\u683c\u5f0f\u7684RPM\u8f6f\u4ef6\u5305\uff08\u4f8b\u5982i386\u3001x86_64\u7b49\u67b6\u6784\uff09\u6765\u8ba9\u7528\u6237\u9009\u62e9\u3002\u800c\u6e90\u7801\u5305\u7684\u8f6f\u4ef6\u4f5c\u8005\u80af\u5b9a\u5e0c\u671b\u81ea\u5df1\u7684\u8f6f\u4ef6\u80fd\u591f\u88ab\u5b89\u88c5\u5230\u66f4\u591a\u7684\u7cfb\u7edf\u4e0a\u9762\uff0c\u80fd\u591f\u88ab\u66f4\u591a\u7684\u7528\u6237\u6240\u4e86\u89e3\u3001\u4f7f\u7528\uff0c\u56e0\u6b64\u4fbf\u4f1a\u5728\u7f16\u8bd1\u9636\u6bb5\uff08configure\uff09\u6765\u68c0\u67e5\u7528\u6237\u5f53\u524d\u7cfb\u7edf\u7684\u60c5\u51b5\uff0c\u7136\u540e\u5236\u5b9a\u51fa\u4e00\u4efd\u53ef\u884c\u7684\u5b89\u88c5\u65b9\u6848\uff0c\u6240\u4ee5\u4f1a\u5360\u7528\u5f88\u591a\u7684\u7cfb\u7edf\u8d44\u6e90\uff0c\u9700\u8981\u66f4\u957f\u7684\u7b49\u5f85\u65f6\u95f4\u3002<\/p>\n

\u51fa\u73b0\u95ee\u9898?\u5927\u80c6\u63d0\u95ee!<\/strong><\/span><\/p>\n

\u56e0\u8bfb\u8005\u4eec\u786c\u4ef6\u4e0d\u540c\u6216\u64cd\u4f5c\u9519\u8bef\u90fd\u53ef\u80fd\u5bfc\u81f4\u5b9e\u9a8c\u914d\u7f6e\u51fa\u9519\uff0c\u8bf7\u8010\u5fc3\u518d\u4ed4\u7ec6\u770b\u770b\u64cd\u4f5c\u6b65\u9aa4\u5427\uff0c\u4e0d\u8981\u6c14\u9981~<\/p>\n

Linux\u6280\u672f\u4ea4\u6d41\u8bf7\u52a0A\u7fa4\uff1a560843(\u6ee1<\/span><\/strong>)\uff0cB\u7fa4\uff1a340829(\u63a8\u8350<\/span><\/strong>)\uff0cC\u7fa4\uff1a463590\uff08\u63a8\u8350<\/span><\/strong>\uff09\uff0c\u70b9\u6b64\u67e5\u770b\u5168\u56fd\u7fa4<\/a>\u3002<\/p>\n

*\u672c\u7fa4\u7279\u8272\uff1a\u901a\u8fc7\u53e3\u4ee4\u9a8c\u8bc1\u786e\u4fdd\u6bcf\u4e00\u4e2a\u7fa4\u5458\u90fd\u662f\u300aLinux\u5c31\u8be5\u8fd9\u4e48\u5b66\u300b\u7684\u8bfb\u8005\uff0c\u7b54\u7591\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u4e0d\u5b9a\u671f\u514d\u8d39\u9886\u53d6\u5b9a\u5236\u793c\u54c1\u3002<\/p><\/blockquote>\n

20.2 LNMP\u52a8\u6001\u7f51\u7ad9\u67b6\u6784<\/strong><\/span><\/h5>\n

LNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u662f\u4e00\u5957\u7531Linux + Nginx + MySQL + PHP\u7ec4\u6210\u7684\u52a8\u6001\u7f51\u7ad9\u7cfb\u7edf\u89e3\u51b3\u65b9\u6848\uff08\u5176logo\u89c1\u56fe20-1\uff09\u3002LNMP\u4e2d\u7684\u5b57\u6bcdL\u662fLinux\u7cfb\u7edf\u7684\u610f\u601d\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u662fRHEL\u3001CentOS\u3001Fedora\uff0c\u8fd8\u53ef\u4ee5\u662fDebian\u3001Ubuntu\u7b49\u7cfb\u7edf\u3002\u672c\u4e66\u7684\u914d\u5957\u7ad9\u70b9https:\/\/lrxjmw.cn<\/a>\u5c31\u662f\u57fa\u4e8eLNMP\u90e8\u7f72\u51fa\u6765\u7684\uff0c\u76ee\u524d\u7684\u8fd0\u884c\u4e00\u76f4\u5f88\u7a33\u5b9a\uff0c\u8bbf\u95ee\u901f\u5ea6\u4e5f\u5f88\u5feb\u3002<\/p>\n

\"lnmp\u67b6\u6784\u56fe\u7247\"<\/p>\n

\u56fe20-1\u00a0 LNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u7684Logo<\/p>\n

\u5728\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u4e4b\u524d\uff0c\u9996\u5148\u8981\u8ba9\u5b89\u88c5\u4e3b\u673a\u5177\u5907\u7f16\u8bd1\u7a0b\u5e8f\u6e90\u7801\u7684\u73af\u5883\uff0c\u4ed6\u9700\u8981\u5177\u5907C\u8bed\u8a00\u3001C++\u8bed\u8a00\u3001Perl\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u4ee5\u53ca\u5404\u79cd\u5e38\u89c1\u7684\u7f16\u8bd1\u652f\u6301\u51fd\u6570\u5e93\u7a0b\u5e8f\u3002\u56e0\u6b64\u8bf7\u5148\u914d\u7f6e\u59a5\u5f53Yum\u8f6f\u4ef6\u4ed3\u5e93\uff0c\u7136\u540e\u628a\u4e0b\u9762\u5217\u51fa\u7684\u8fd9\u4e9b\u8f6f\u4ef6\u5305\u90fd\u7edf\u7edf\u5b89\u88c5\u4e0a\uff1a<\/p>\n

[root@linuxprobe ~]# yum install -y apr* autoconf automake bison bzip2 bzip2* compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel\r\nLoaded plugins: langpacks, product-id, subscription-manager\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u5b89\u88c5\u8fc7\u7a0b\u2026\u2026\u2026\u2026\u2026\u2026\r\nInstalling:\r\n apr                         x86_64       1.4.8-3.el7               rhel7       103 k\r\n apr-devel                   x86_64       1.4.8-3.el7               rhel7       188 k\r\n apr-util                    x86_64       1.5.2-6.el7               rhel7        92 k\r\n apr-util-devel              x86_64       1.5.2-6.el7               rhel7        76 k\r\n autoconf                    noarch       2.69-11.el7               rhel7       701 k\r\n automake                    noarch       1.13.4-3.el7              rhel7       679 k\r\n bison                       x86_64       2.7-4.el7                 rhel7       578 k\r\n bzip2-devel                 x86_64       1.0.6-12.el7              rhel7       218 k\r\n compat-dapl                 x86_64       1:1.2.19-3.el7            rhel7       109 k\r\n compat-db-headers           noarch       4.7.25-27.el7             rhel7        48 k\r\n compat-db47                 x86_64       4.7.25-27.el7             rhel7       795 k\r\n compat-gcc-44               x86_64       4.4.7-8.el7               rhel7        10 M\r\n compat-gcc-44-c++           x86_64       4.4.7-8.el7               rhel7       6.3 M\r\n compat-glibc                x86_64       1:2.12-4.el7              rhel7       1.2 M\r\n compat-glibc-headers        x86_64       1:2.12-4.el7              rhel7       452 k\r\n compat-libcap1              x86_64       1.10-7.el7                rhel7        19 k\r\n compat-libf2c-34            x86_64       3.4.6-32.el7              rhel7       155 k\r\n compat-libgfortran-41       x86_64       4.1.2-44.el7              rhel7       142 k\r\n compat-libtiff3             x86_64       3.9.4-11.el7              rhel7       135 k\r\n compat-openldap             x86_64       1:2.3.43-5.el7            rhel7       174 k\r\n cpp                         x86_64       4.8.2-16.el7              rhel7       5.9 M\r\n fontconfig-devel            x86_64       2.10.95-7.el7             rhel7       128 k\r\n freetype-devel              x86_64       2.4.11-9.el7              rhel7       355 k\r\n gcc                         x86_64       4.8.2-16.el7              rhel7        16 M\r\n gcc-c++                     x86_64       4.8.2-16.el7              rhel7       7.1 M\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u5b89\u88c5\u8fc7\u7a0b\u2026\u2026\u2026\u2026\u2026\u2026\r\nComplete!<\/pre>\n

\u5218\u9044\u8001\u5e08\u5df2\u7ecf\u628a\u5b89\u88c5LNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u6240\u9700\u768416\u4e2a\u8f6f\u4ef6\u6e90\u7801\u5305\u548c1\u4e2a\u7528\u4e8e\u68c0\u67e5\u6548\u679c\u7684\u8bba\u575b\u7f51\u7ad9\u7cfb\u7edf\u8f6f\u4ef6\u5305\u4e0a\u4f20\u5230\u4e0e\u672c\u4e66\u914d\u5957\u7684\u7ad9\u70b9\u670d\u52a1\u5668\u4e0a\u3002\u5927\u5bb6\u53ef\u4ee5\u5728Windows\u7cfb\u7edf\u4e2d\u4e0b\u8f7d\u540e\u901a\u8fc7ssh\u670d\u52a1\u4f20\u9001\u5230\u6253\u7b97\u90e8\u7f72LNMP\u52a8\u6001\u7f51\u7ad9\u67b6\u6784\u7684Linux\u670d\u52a1\u5668\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728Linux\u670d\u52a1\u5668\u4e2d\u4f7f\u7528wget\u547d\u4ee4\u4e0b\u8f7d\u8fd9\u4e9b\u6e90\u7801\u5305\u6587\u4ef6\u3002\u6839\u636e\u7b2c6\u7ae0\u8bb2\u89e3\u7684FHS\u534f\u8bae\uff0c\u5efa\u8bae\u628a\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u5b58\u653e\u5728\/usr\/local\/src\u76ee\u5f55\u4e2d\uff1a<\/p>\n

[root@linuxprobe ~]# cd \/usr\/local\/src\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/cmake-2.8.11.2.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/Discuz_X3.2_SC_GBK.zip\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/freetype-2.5.3.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/jpegsrc.v9a.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/libgd-2.1.0.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/libmcrypt-2.5.8.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/libpng-1.6.12.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/libvpx-v1.3.0.tar.bz2\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/mysql-5.6.19.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/nginx-1.6.0.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/openssl-1.0.1h.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/php-5.5.14.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/pcre-8.35.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/t1lib-5.1.2.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/tiff-4.0.3.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/yasm-1.2.0.tar.gz\r\n[root@linuxprobe src] # wget https:\/\/lrxjmw.cn\/Software\/zlib-1.2.8.tar.gz\r\n[root@linuxprobe src]# ls\r\nzlib-1.2.8.tar.gz       libmcrypt-2.5.8.tar.gz  pcre-8.35.tar.gz\r\ncmake-2.8.11.2.tar.gz   libpng-1.6.12.tar.gz    php-5.5.14.tar.gz\r\nDiscuz_X3.2_SC_GBK.zip  libvpx-v1.3.0.tar.bz2   t1lib-5.1.2.tar.gz\r\nfreetype-2.5.3.tar.gz   mysql-5.6.19.tar.gz     tiff-4.0.3.tar.gz\r\njpegsrc.v9a.tar.gz      nginx-1.6.0.tar.gz      yasm-1.2.0.tar.gz\r\nlibgd-2.1.0.tar.gz      openssl-1.0.1h.tar.gz<\/pre>\n

CMake\u662fLinux\u7cfb\u7edf\u4e2d\u4e00\u6b3e\u5e38\u7528\u7684\u7f16\u8bd1\u5de5\u5177\u3002\u8981\u60f3\u901a\u8fc7\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\uff0c\u5c31\u4e00\u5b9a\u8981\u4e25\u683c\u9075\u5b88\u4e0a\u9762\u603b\u7ed3\u7684\u5b89\u88c5\u6b65\u9aa4\u2014\u4e0b\u8f7d\u53ca\u89e3\u538b\u6e90\u7801\u5305\u6587\u4ef6\u3001\u7f16\u8bd1\u6e90\u7801\u5305\u4ee3\u7801\u3001\u751f\u6210\u4e8c\u8fdb\u5236\u5b89\u88c5\u7a0b\u5e8f\u3001\u8fd0\u884c\u4e8c\u8fdb\u5236\u7684\u670d\u52a1\u7a0b\u5e8f\u5b89\u88c5\u5305\u3002\u63a5\u4e0b\u6765\u5728\u89e3\u538b\u3001\u7f16\u8bd1\u5404\u4e2a\u8f6f\u4ef6\u5305\u6e90\u7801\u7a0b\u5e8f\u65f6\uff0c\u90fd\u4f1a\u751f\u6210\u5927\u91cf\u7684\u8f93\u51fa\u4fe1\u606f\uff0c\u4e0b\u6587\u4e2d\u5c06\u5176\u7701\u7565\uff0c\u8bf7\u8bfb\u8005\u4ee5\u5b9e\u9645\u64cd\u4f5c\u4e3a\u51c6\u3002<\/p>\n

[root@linuxprobe src]# tar xzvf cmake-2.8.11.2.tar.gz\r\n[root@linuxprobe src]# cd cmake-2.8.11.2\/\r\n[root@linuxprobe cmake-2.8.11.2]# .\/configure\r\n[root@linuxprobe cmake-2.8.11.2]# make \r\n[root@linuxprobe cmake-2.8.11.2]# make install\r\n<\/pre>\n
20.2.1 \u914d\u7f6eMysql\u670d\u52a1<\/strong><\/span><\/h6>\n

\u672c\u4e66\u5728\u7b2c18\u7ae0\u8bb2\u89e3\u8fc7MySQL\u548cMariaDB\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u4e4b\u95f4\u7684\u56e0\u7f18\u548c\u7279\u6027\uff0c\u4e5f\u72e0\u72e0\u5730\u5938\u5956\u4e86MariaDB\u6570\u636e\u5e93\uff0c\u4f46\u662fMySQL\u6570\u636e\u5e93\u5f53\u524d\u4f9d\u7136\u662f\u751f\u4ea7\u73af\u5883\u4e2d\u6700\u5e38\u4f7f\u7528\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u4e4b\u4e00\uff0c\u5750\u62e5\u6781\u5927\u7684\u5e02\u573a\u4efd\u989d\uff0c\u5e76\u4e14\u5df2\u7ecf\u901a\u8fc7\u5341\u51e0\u5e74\u4e0d\u65ad\u7684\u53d1\u5c55\u5411\u4e1a\u754c\u8bc1\u660e\u4e86\u81ea\u8eab\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\u3002\u53e6\u5916\uff0c\u867d\u7136\u7b2c18\u7ae0\u5df2\u7ecf\u8bb2\u89e3\u4e86\u57fa\u672c\u7684\u6570\u636e\u5e93\u7ba1\u7406\u77e5\u8bc6\uff0c\u4f46\u662f\u4e3a\u4e86\u8fdb\u4e00\u6b65\u5e2e\u52a9\u5927\u5bb6\u592f\u5b9e\u57fa\u7840\uff0c\u672c\u7ae0\u4f9d\u7136\u5728\u8fd9\u91cc\u6574\u5408\u4e86MySQL\u6570\u636e\u5e93\u5185\u5bb9\uff0c\u4f7f\u5927\u5bb6\u5728\u6e29\u6545\u7684\u540c\u65f6\u53ef\u4ee5\u77e5\u65b0\u3002<\/p>\n

\u5728\u4f7f\u7528Yum\u8f6f\u4ef6\u4ed3\u5e93\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u65f6\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u6839\u636eRPM\u8f6f\u4ef6\u5305\u4e2d\u7684\u6307\u4ee4\u96c6\u5b8c\u6574\u8f6f\u4ef6\u914d\u7f6e\u7b49\u5de5\u4f5c\u3002\u4f46\u662f\u4e00\u65e6\u9009\u62e9\u4f7f\u7528\u6e90\u7801\u5305\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\uff0c\u8fd9\u4e00\u5207\u5c31\u9700\u8981\u81ea\u5df1\u6765\u5b8c\u6210\u4e86\u3002\u9488\u5bf9MySQL\u6570\u636e\u5e93\u6765\u8bb2\uff0c\u6211\u4eec\u9700\u8981\u5728\u7cfb\u7edf\u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3amysql\u7684\u7528\u6237\uff0c\u4e13\u95e8\u7528\u4e8e\u8d1f\u8d23\u8fd0\u884cMySQL\u6570\u636e\u5e93\u3002\u8bf7\u8bb0\u5f97\u8981\u628a\u8fd9\u7c7b\u8d26\u6237\u7684Bash\u7ec8\u7aef\u8bbe\u7f6e\u6210nologin\u89e3\u91ca\u5668\uff0c\u907f\u514d\u9ed1\u5ba2\u901a\u8fc7\u8be5\u7528\u6237\u767b\u5f55\u5230\u670d\u52a1\u5668\u4e2d\uff0c\u4ece\u800c\u63d0\u9ad8\u7cfb\u7edf\u5b89\u5168\u6027\u3002<\/p>\n

[root@linuxprobe cmake-2.8.11.2]# cd ..\r\n[root@linuxprobe src]# useradd mysql -s \/sbin\/nologin\r\n<\/pre>\n

\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u4fdd\u5b58MySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u548c\u6570\u636e\u5e93\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u5e76\u628a\u8be5\u76ee\u5f55\u7684\u6240\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u8eab\u4efd\u4fee\u6539\u4e3amysql\u3002\u5176\u4e2d\uff0c\/usr\/local\/mysql\u662f\u7528\u4e8e\u4fdd\u5b58MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u7684\u76ee\u5f55\uff0c\/usr\/local\/mysql\/var\u5219\u662f\u7528\u4e8e\u4fdd\u5b58\u771f\u5b9e\u6570\u636e\u5e93\u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/p>\n

[root@linuxprobe src]# mkdir -p \/usr\/local\/mysql\/var\r\n[root@linuxprobe src]# chown -Rf mysql:mysql \/usr\/local\/mysql\r\n<\/pre>\n

\u63a5\u4e0b\u6765\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u3002\u5728\u7f16\u8bd1\u6570\u636e\u5e93\u65f6\u4f7f\u7528\u7684\u662fcmake\u547d\u4ee4\uff0c\u5176\u4e2d\uff0c-DCMAKE_INSTALL_PREFIX\u53c2\u6570\u7528\u4e8e\u5b9a\u4e49\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u7684\u4fdd\u5b58\u76ee\u5f55\uff0c-DMYSQL_DATADIR\u53c2\u6570\u7528\u4e8e\u5b9a\u4e49\u771f\u5b9e\u6570\u636e\u5e93\u6587\u4ef6\u7684\u76ee\u5f55\uff0c-DSYSCONFDIR\u5219\u662f\u5b9a\u4e49MySQL\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u7684\u4fdd\u5b58\u76ee\u5f55\u3002\u7531\u4e8eMySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u6bd4\u8f83\u5927\uff0c\u56e0\u6b64\u7f16\u8bd1\u7684\u8fc7\u7a0b\u6bd4\u8f83\u6f2b\u957f\uff0c\u5728\u6b64\u671f\u95f4\u53ef\u4ee5\u7a0d\u5fae\u4f11\u606f\u4e00\u4e0b\u3002<\/p>\n

[root@linuxprobe src]# tar xzvf mysql-5.6.19.tar.gz\r\n[root@linuxprobe src]# cd mysql-5.6.19\/\r\n[root@linuxprobe mysql-5.6.19]# cmake . -DCMAKE_INSTALL_PREFIX=\/usr\/local\/mysql -DMYSQL_DATADIR=\/usr\/local\/mysql\/var -DSYSCONFDIR=\/etc\r\n[root@linuxprobe mysql-5.6.19]# make\r\n[root@linuxprobe mysql-5.6.19]# make install\r\n<\/pre>\n

\u4e3a\u4e86\u8ba9MySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u6b63\u5e38\u8fd0\u8f6c\u8d77\u6765\uff0c\u9700\u8981\u5148\u5220\u9664\/etc\u76ee\u5f55\u4e2d\u7684\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u5728MySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u7684\u4fdd\u5b58\u76ee\u5f55scripts\u5185\u627e\u5230\u4e00\u4e2a\u540d\u4e3amysql_install_db\u7684\u811a\u672c\u7a0b\u5e8f\uff0c\u6267\u884c\u8fd9\u4e2a\u811a\u672c\u7a0b\u5e8f\u5e76\u4f7f\u7528--user\u53c2\u6570\u6307\u5b9aMySQL\u670d\u52a1\u7684\u5bf9\u5e94\u8d26\u53f7\u540d\u79f0\uff08\u5728\u524d\u9762\u6b65\u9aa4\u5df2\u7ecf\u521b\u5efa\uff09\uff0c\u4f7f\u7528--basedir\u53c2\u6570\u6307\u5b9aMySQL\u670d\u52a1\u7a0b\u5e8f\u7684\u4fdd\u5b58\u76ee\u5f55\uff0c\u4f7f\u7528--datadir\u53c2\u6570\u6307\u5b9aMySQL\u771f\u5b9e\u6570\u636e\u5e93\u7684\u6587\u4ef6\u4fdd\u5b58\u76ee\u5f55\uff0c\u8fd9\u6837\u5373\u53ef\u751f\u6210\u7cfb\u7edf\u6570\u636e\u5e93\u6587\u4ef6\uff0c\u4e5f\u4f1a\u751f\u6210\u51fa\u65b0\u7684MySQL\u670d\u52a1\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n

[root@linuxprobe mysql-5.6.19]# rm -rf \/etc\/my.cnf\r\n[root@linuxprobe mysql-5.6.19]# cd \/usr\/local\/mysql\r\n[root@linuxprobe mysql]# .\/scripts\/mysql_install_db --user=mysql --basedir=\/usr\/local\/mysql --datadir=\/usr\/local\/mysql\/var<\/pre>\n

\u628a\u7cfb\u7edf\u65b0\u751f\u6210\u7684MySQL\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6\u94fe\u63a5\u5230\/etc\u76ee\u5f55\u4e2d\uff0c\u7136\u540e\u628a\u7a0b\u5e8f\u76ee\u5f55\u4e2d\u7684\u5f00\u673a\u7a0b\u5e8f\u6587\u4ef6\u590d\u5236\u5230\/etc\/rc.d\/init.d\u76ee\u5f55\u4e2d\uff0c\u4ee5\u4fbf\u901a\u8fc7service\u547d\u4ee4\u6765\u7ba1\u7406MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u3002\u8bb0\u5f97\u628a\u6570\u636e\u5e93\u811a\u672c\u6587\u4ef6\u7684\u6743\u9650\u4fee\u6539\u6210755\u4ee5\u4fbf\u4e8e\u8ba9\u7528\u6237\u6709\u6267\u884c\u8be5\u811a\u672c\u7684\u6743\u9650\uff1a<\/p>\n

[root@linuxprobe mysql]# ln -s my.cnf \/etc\/my.cnf \r\n[root@linuxprobe mysql]# cp .\/support-files\/mysql.server \/etc\/rc.d\/init.d\/mysqld\r\n[root@linuxprobe mysql]# chmod 755 \/etc\/rc.d\/init.d\/mysqld\r\n<\/pre>\n

\u7f16\u8f91\u521a\u590d\u5236\u7684MySQL\u6570\u636e\u5e93\u811a\u672c\u6587\u4ef6\uff0c\u628a\u7b2c46\u300147\u884c\u7684basedir\u4e0edatadir\u53c2\u6570\u5206\u522b\u4fee\u6539\u4e3aMySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u7684\u4fdd\u5b58\u76ee\u5f55\u548c\u771f\u5b9e\u6570\u636e\u5e93\u7684\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n

[root@linuxprobe mysql]# vim \/etc\/rc.d\/init.d\/mysqld \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n 39 #\r\n 40 # If you want to affect other MySQL variables, you should make your changes\r\n 41 # in the \/etc\/my.cnf, ~\/.my.cnf or other MySQL configuration files.\r\n 42 \r\n 43 # If you change base dir, you must also change datadir. These may get\r\n 44 # overwritten by settings in the MySQL configuration files.\r\n 45 \r\n 46 basedir=\/usr\/local\/mysql<\/strong>\r\n 47 datadir=\/usr\/local\/mysql\/var<\/strong>\r\n 48 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n

\u914d\u7f6e\u597d\u811a\u672c\u6587\u4ef6\u540e\u4fbf\u53ef\u4ee5\u7528service\u547d\u4ee4\u542f\u52a8mysqld\u6570\u636e\u5e93\u670d\u52a1\u4e86\u3002mysqld\u662fMySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u7684\u670d\u52a1\u540d\u79f0\uff0c\u6ce8\u610f\u4e0d\u8981\u5199\u9519\u3002\u987a\u5e26\u518d\u4f7f\u7528chkconfig\u547d\u4ee4\u628amysqld\u670d\u52a1\u7a0b\u5e8f\u52a0\u5165\u5230\u5f00\u673a\u542f\u52a8\u9879\u4e2d\u3002<\/p>\n

[root@Linuxprobe mysql]# service mysqld start\r\nStarting MySQL. SUCCESS! \r\n[root@linuxprobe mysql]# chkconfig mysqld on<\/pre>\n

MySQL\u6570\u636e\u5e93\u7a0b\u5e8f\u81ea\u5e26\u4e86\u8bb8\u591a\u547d\u4ee4\uff0c\u4f46\u662fBash\u7ec8\u7aef\u7684PATH\u53d8\u91cf\u5e76\u4e0d\u4f1a\u5305\u542b\u8fd9\u4e9b\u547d\u4ee4\u6240\u5b58\u653e\u7684\u76ee\u5f55\uff0c\u56e0\u6b64\u6211\u4eec\u4e5f\u65e0\u6cd5\u987a\u5229\u5730\u5bf9MySQL\u6570\u636e\u5e93\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u4e5f\u5c31\u4e0d\u80fd\u4f7f\u7528MySQL\u6570\u636e\u5e93\u81ea\u5e26\u7684\u547d\u4ee4\u4e86\u3002\u60f3\u8981\u628a\u547d\u4ee4\u6240\u4fdd\u5b58\u7684\u76ee\u5f55\u6c38\u4e45\u6027\u5730\u5b9a\u4e49\u5230PATH\u53d8\u91cf\u4e2d\uff0c\u9700\u8981\u7f16\u8f91\/etc\/profile\u6587\u4ef6\u5e76\u5199\u5165\u8ffd\u52a0\u7684\u547d\u4ee4\u76ee\u5f55\uff0c\u8fd9\u6837\u5f53\u7269\u7406\u8bbe\u5907\u5728\u4e0b\u4e00\u6b21\u91cd\u542f\u65f6\u5c31\u4f1a\u6c38\u4e45\u751f\u6548\u4e86\u3002\u5982\u679c\u4e0d\u60f3\u901a\u8fc7\u91cd\u542f\u8bbe\u5907\u7684\u65b9\u5f0f\u6765\u751f\u6548\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528source\u547d\u4ee4\u52a0\u8f7d\u4e00\u4e0b\/ect\/profile\u6587\u4ef6\uff0c\u6b64\u65f6\u65b0\u7684PATH\u53d8\u91cf\u4e5f\u53ef\u4ee5\u7acb\u5373\u751f\u6548\u4e86\u3002<\/p>\n

[root@linuxprobe mysql]# vim \/etc\/profile\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n 64 \r\n 65 for i in \/etc\/profile.d\/*.sh ; do\r\n 66 if [ -r \"$i\" ]; then\r\n 67 if [ \"${-#*i}\" != \"$-\" ]; then\r\n 68 . \"$i\"\r\n 69 else\r\n 70 . \"$i\" >\/dev\/null\r\n 71 fi\r\n 72 fi\r\n 73 done\r\n 74 export PATH=$PATH:\/usr\/local\/mysql\/bin<\/strong>\r\n 75 unset i\r\n 76 unset -f pathmunge\r\n[root@linuxprobe mysql]# source \/etc\/profile\r\n<\/pre>\n

MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u8fd8\u4f1a\u8c03\u7528\u5230\u4e00\u4e9b\u7a0b\u5e8f\u6587\u4ef6\u548c\u51fd\u6570\u5e93\u6587\u4ef6\u3002\u7531\u4e8e\u5f53\u524d\u662f\u901a\u8fc7\u6e90\u7801\u5305\u65b9\u5f0f\u5b89\u88c5MySQL\u6570\u636e\u5e93\uff0c\u56e0\u6b64\u73b0\u5728\u4e5f\u5fc5\u987b\u4ee5\u624b\u52a8\u65b9\u5f0f\u628a\u8fd9\u4e9b\u6587\u4ef6\u94fe\u63a5\u8fc7\u6765\u3002<\/p>\n

[root@linuxprobe mysql]# mkdir \/var\/lib\/mysql\r\n[root@linuxprobe mysql]# ln -s \/usr\/local\/mysql\/lib\/mysql \/usr\/lib\/mysql\r\n[root@linuxprobe mysql]# ln -s \/tmp\/mysql.sock \/var\/lib\/mysql\/mysql.sock\r\n[root@linuxprobe mysql]# ln -s \/usr\/local\/mysql\/include\/mysql \/usr\/include\/mysql<\/pre>\n

\u73b0\u5728\uff0cMySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u5df2\u7ecf\u542f\u52a8\uff0c\u8c03\u7528\u7684\u5404\u4e2a\u51fd\u6570\u6587\u4ef6\u5df2\u7ecf\u5c31\u4f4d\uff0cPATH\u73af\u5883\u53d8\u91cf\u4e2d\u4e5f\u52a0\u5165\u4e86MySQL\u6570\u636e\u5e93\u547d\u4ee4\u7684\u6240\u5728\u76ee\u5f55\u3002\u63a5\u4e0b\u6765\u51c6\u5907\u5bf9MySQL\u6570\u636e\u5e93\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u8fd9\u4e2a\u521d\u59cb\u5316\u7684\u914d\u7f6e\u8fc7\u7a0b\u4e0eMariaDB\u6570\u636e\u5e93\u662f\u4e00\u6837\u7684\uff0c\u53ea\u662f\u6700\u540e\u53d8\u6210\u4e86Thanks for using MySQL!<\/p>\n

[root@linuxprobe mysql]# mysql_secure_installation \r\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL\r\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!\r\nIn order to log into MySQL to secure it, we'll need the current\r\npassword for the root user.  If you've just installed MySQL, and\r\nyou haven't set the root password yet, the password will be blank,\r\nso you should just press enter here.\r\nEnter current password for root (enter for none): \u6b64\u5904\u53ea\u9700\u6309\u4e0b\u56de\u8f66\u952e<\/strong>\r\nOK, successfully used password, moving on...\r\nSetting the root password ensures that nobody can log into the MySQL\r\nroot user without the proper authorisation.\r\nSet root password? [Y\/n] y<\/strong>\u00a0<\/strong>\uff08\u8981\u4e3a<\/strong>root<\/strong>\u7ba1\u7406\u5458\u8bbe\u7f6e\u6570\u636e\u5e93\u7684\u5bc6\u7801\uff09<\/strong>\r\nNew password: \u8f93\u5165\u8981\u4e3a<\/strong>root<\/strong>\u7ba1\u7406\u5458\u8bbe\u7f6e\u7684\u6570\u636e\u5e93\u5bc6\u7801<\/strong>\r\nRe-enter new password: \u518d\u8f93\u5165\u4e00\u6b21\u5bc6\u7801<\/strong>\r\nPassword updated successfully!\r\nReloading privilege tables..\r\n ... Success!\r\nBy default, a MySQL installation has an anonymous user, allowing anyone\r\nto log into MySQL without having to have a user account created for\r\nthem.  This is intended only for testing, and to make the installation\r\ngo a bit smoother.  You should remove them before moving into a\r\nproduction environment.\r\nRemove anonymous users? [Y\/n] y\u00a0<\/strong>\uff08\u5220\u9664\u533f\u540d\u8d26\u6237\uff09<\/strong>\r\n ... Success!\r\nNormally, root should only be allowed to connect from 'localhost'.  This\r\nensures that someone cannot guess at the root password from the network.\r\nDisallow root login remotely? [Y\/n] y\u00a0<\/strong>\uff08\u7981\u6b62<\/strong>root<\/strong>\u7ba1\u7406\u5458\u4ece\u8fdc\u7a0b\u767b\u5f55\uff09<\/strong>\r\n ... Success!\r\nBy default, MySQL comes with a database named 'test' that anyone can\r\naccess.  This is also intended only for testing, and should be removed\r\nbefore moving into a production environment.\r\nRemove test database and access to it? [Y\/n] y<\/strong>\u00a0<\/strong>\uff08\u5220\u9664<\/strong>test<\/strong>\u6570\u636e\u5e93\u5e76\u53d6\u6d88\u5bf9\u5176\u7684\u8bbf\u95ee\u6743\u9650\uff09<\/strong>\r\n - Dropping test database...\r\n ... Success!\r\n - Removing privileges on test database...\r\n ... Success!\r\nReloading the privilege tables will ensure that all changes made so far\r\nwill take effect immediately.\r\nReload privilege tables now? [Y\/n] y\u00a0<\/strong>\uff08\u5237\u65b0\u6388\u6743\u8868\uff0c\u8ba9\u521d\u59cb\u5316\u540e\u7684\u8bbe\u5b9a\u7acb\u5373\u751f\u6548\uff09<\/strong>\r\n ... Success!\r\nAll done!  If you've completed all of the above steps, your MySQL\r\ninstallation should now be secure.\r\nThanks for using MySQL!\r\nCleaning up...<\/pre>\n
20.2.2 \u914d\u7f6eNginx\u670d\u52a1<\/strong><\/span><\/h6>\n

Nginx\u662f\u4e00\u6b3e\u76f8\u5f53\u4f18\u79c0\u7684\u7528\u4e8e\u90e8\u7f72\u52a8\u6001\u7f51\u7ad9\u7684\u8f7b\u91cf\u7ea7\u670d\u52a1\u7a0b\u5e8f\uff0c\u5b83\u6700\u521d\u662f\u4e3a\u4fc4\u7f57\u65af\u95e8\u6237\u7ad9\u70b9\u800c\u5f00\u53d1\u7684\uff0c\u56e0\u5176\u7a33\u5b9a\u6027\u3001\u529f\u80fd\u4e30\u5bcc\u3001\u5360\u7528\u5185\u5b58\u5c11\u4e14\u5e76\u53d1\u80fd\u529b\u5f3a\u800c\u5907\u53d7\u7528\u6237\u7684\u4fe1\u8d56\u3002\u76ee\u524d\u56fd\u5185\u8bf8\u5982\u65b0\u6d6a\u3001\u7f51\u6613\u3001\u817e\u8baf\u7b49\u95e8\u6237\u7ad9\u70b9\u5747\u5df2\u4f7f\u7528\u4e86\u6b64\u670d\u52a1\u3002<\/p>\n

Nginx\u670d\u52a1\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u6e90\u81ea\u4e8e\u91c7\u7528\u4e86\u5206\u9636\u6bb5\u7684\u8d44\u6e90\u5206\u914d\u6280\u672f\uff0c\u964d\u4f4e\u4e86CPU\u4e0e\u5185\u5b58\u7684\u5360\u7528\u7387\uff0c\u6240\u4ee5\u4f7f\u7528Nginx\u7a0b\u5e8f\u90e8\u7f72\u7684\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u4e0d\u4ec5\u5341\u5206\u7a33\u5b9a\u3001\u9ad8\u6548\uff0c\u800c\u4e14\u6d88\u8017\u7684\u7cfb\u7edf\u8d44\u6e90\u4e5f\u5f88\u5c11\u3002\u6b64\u5916\uff0cNginx\u5177\u5907\u7684\u6a21\u5757\u6570\u91cf\u4e0eApache\u5177\u5907\u7684\u6a21\u5757\u6570\u91cf\u51e0\u4e4e\u76f8\u540c\uff0c\u800c\u4e14\u73b0\u5728\u5df2\u7ecf\u5b8c\u5168\u652f\u6301proxy\u3001rewrite\u3001mod_fcgi\u3001ssl\u3001vhosts\u7b49\u5e38\u7528\u6a21\u5757\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0cNginx\u8fd8\u652f\u6301\u70ed\u90e8\u7f72\u6280\u672f\uff0c\u53ef\u4ee57\u00d724\u4e0d\u95f4\u65ad\u63d0\u4f9b\u670d\u52a1\uff0c\u8fd8\u53ef\u4ee5\u5728\u4e0d\u6682\u505c\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u76f4\u63a5\u5bf9Nginx\u670d\u52a1\u7a0b\u5e8f\u8fdb\u884c\u5347\u7ea7\u3002<\/p>\n

\"Nginx\u4e0eApache\"<\/p>\n

\u56fe20-2 Nginx\u4e0eApache\u8457\u540dLOGO<\/p>\n

\u5766\u767d\u6765\u8bb2\uff0c\u867d\u7136Nginx\u7a0b\u5e8f\u7684\u4ee3\u7801\u8d28\u91cf\u975e\u5e38\u9ad8\uff0c\u4ee3\u7801\u5f88\u89c4\u8303\uff0c\u6280\u672f\u6210\u719f\uff0c\u6a21\u5757\u6269\u5c55\u4e5f\u5f88\u5bb9\u6613\uff0c\u4f46\u4f9d\u7136\u5b58\u5728\u4e0d\u5c11\u95ee\u9898\uff0c\u6bd4\u5982\u662f\u7531\u4fc4\u7f57\u65af\u4eba\u5f00\u53d1\u7684\uff0c\u6240\u4ee5\u5728\u8d44\u6599\u6587\u6863\u65b9\u9762\u8fd8\u5e76\u4e0d\u5b8c\u5584\uff0c\u4e2d\u6587\u8d44\u6599\u7684\u8d28\u91cf\u66f4\u662f\u9c7c\u9f99\u6df7\u6742\u3002\u4f46\u662fNginx\u670d\u52a1\u7a0b\u5e8f\u5728\u8fd1\u5e74\u6765\u589e\u957f\u52bf\u5934\u8fc5\u731b\uff0c\u76f8\u4fe1\u4f1a\u5728\u8f7b\u91cf\u7ea7Web\u670d\u52a1\u5668\u5e02\u573a\u5177\u6709\u4e0d\u9519\u7684\u672a\u6765\u3002<\/p>\n

\u5728\u6b63\u5f0f\u5b89\u88c5Nginx\u670d\u52a1\u7a0b\u5e8f\u4e4b\u524d\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u4e3a\u5176\u89e3\u51b3\u76f8\u5173\u7684\u8f6f\u4ef6\u4f9d\u8d56\u5173\u7cfb\uff0c\u4f8b\u5982\u7528\u4e8e\u63d0\u4f9bPerl\u8bed\u8a00\u517c\u5bb9\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5e93\u7684\u8f6f\u4ef6\u5305pcre\uff0c\u5c31\u662fNginx\u670d\u52a1\u7a0b\u5e8f\u7528\u4e8e\u5b9e\u73b0\u4f2a\u9759\u6001\u529f\u80fd\u5fc5\u4e0d\u53ef\u5c11\u7684\u4f9d\u8d56\u5305\u3002\u4e0b\u9762\u6765\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u751f\u6210\u3001\u5b89\u88c5Nginx\u670d\u52a1\u7a0b\u5e8f\u7684\u6e90\u7801\u6587\u4ef6\uff1a<\/p>\n

[root@linuxprobe ~]# cd \/usr\/local\/src\r\n[root@linuxprobe src]# tar xzvf pcre-8.35.tar.gz \r\n[root@linuxprobe src]# cd pcre-8.35\r\n[root@linuxprobe pcre-8.35]# .\/configure --prefix=\/usr\/local\/pcre\r\n[root@linuxprobe pcre-8.35]# make\r\n[root@linuxprobe pcre-8.35]# make install \r\n<\/pre>\n

openssl\u8f6f\u4ef6\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u7f51\u7ad9\u52a0\u5bc6\u8bc1\u4e66\u670d\u52a1\u7684\u7a0b\u5e8f\u6587\u4ef6\uff0c\u5728\u5b89\u88c5\u8be5\u7a0b\u5e8f\u65f6\u9700\u8981\u81ea\u5b9a\u4e49\u670d\u52a1\u7a0b\u5e8f\u7684\u5b89\u88c5\u76ee\u5f55\uff0c\u4ee5\u4fbf\u4e8e\u7a0d\u540e\u8c03\u7528\u5b83\u4eec\u7684\u65f6\u5019\u66f4\u53ef\u63a7\u3002<\/p>\n

[root@linuxprobe pcre-8.35]# cd \/usr\/local\/src\r\n[root@linuxprobe src]# tar xzvf openssl-1.0.1h.tar.gz\r\n[root@linuxprobe src]# cd openssl-1.0.1h\r\n[root@linuxprobe openssl-1.0.1h]# .\/config --prefix=\/usr\/local\/openssl\r\n[root@linuxprobe openssl-1.0.1h]# make\r\n[root@linuxprobe openssl-1.0.1h]# make install \r\n<\/pre>\n

openssl\u8f6f\u4ef6\u5305\u5b89\u88c5\u540e\u9ed8\u8ba4\u4f1a\u5728\/usr\/local\/openssl\/bin\u76ee\u5f55\u4e2d\u63d0\u4f9b\u5f88\u591a\u7684\u53ef\u7528\u547d\u4ee4\uff0c\u6211\u4eec\u9700\u8981\u50cf\u524d\u9762\u7684\u64cd\u4f5c\u90a3\u6837\uff0c\u5c06\u8fd9\u4e2a\u76ee\u5f55\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u5e76\u5199\u5165\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6700\u540e\u6267\u884csource\u547d\u4ee4\u4ee5\u4fbf\u8ba9\u65b0\u7684PATH\u73af\u5883\u53d8\u91cf\u5185\u5bb9\u53ef\u4ee5\u7acb\u5373\u751f\u6548\uff1a<\/p>\n

[root@linuxprobe pcre-8.35]# vim \/etc\/profile\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n 64 \r\n 65 for i in \/etc\/profile.d\/*.sh ; do\r\n 66 if [ -r \"$i\" ]; then\r\n 67 if [ \"${-#*i}\" != \"$-\" ]; then\r\n 68 . \"$i\"\r\n 69 else\r\n 70 . \"$i\" >\/dev\/null\r\n 71 fi\r\n 72 fi\r\n 73 done\r\n 74 export PATH=$PATH:\/usr\/local\/mysql\/bin:\/usr\/local\/openssl\/bin<\/strong>\r\n 75 unset i\r\n 76 unset -f pathmunge\r\n[root@linuxprobe pcre-8.35]# source \/etc\/profile\r\n<\/pre>\n

zlib\u8f6f\u4ef6\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u538b\u7f29\u529f\u80fd\u7684\u51fd\u6570\u5e93\u6587\u4ef6\u3002\u5176\u5b9eNginx\u670d\u52a1\u7a0b\u5e8f\u8c03\u7528\u7684\u8fd9\u4e9b\u670d\u52a1\u7a0b\u5e8f\u65e0\u9700\u6df1\u5165\u4e86\u89e3\uff0c\u53ea\u8981\u5927\u81f4\u4e86\u89e3\u5176\u4f5c\u7528\u5c31\u5df2\u7ecf\u8db3\u591f\u4e86\uff1a<\/p>\n

[root@linuxprobe pcre-8.35]# cd \/usr\/local\/src\r\n[root@linuxprobe src]# tar xzvf zlib-1.2.8.tar.gz \r\n[root@linuxprobe src]# cd zlib-1.2.8\r\n[root@linuxprobe zlib-1.2.8]# .\/configure --prefix=\/usr\/local\/zlib\r\n[root@linuxprobe zlib-1.2.8]# make\r\n[root@linuxprobe zlib-1.2.8]# make install\r\n<\/pre>\n

\u5728\u5b89\u88c5\u90e8\u7f72\u597d\u5177\u6709\u4f9d\u8d56\u5173\u7cfb\u7684\u8f6f\u4ef6\u5305\u4e4b\u540e\uff0c\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u6267\u884cNginx\u670d\u52a1\u7a0b\u5e8f\u7684\u8d26\u6237\u3002\u8d26\u6237\u540d\u79f0\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff0c\u4f46\u4e00\u5b9a\u522b\u5fd8\u8bb0\uff0c\u56e0\u4e3a\u5728\u540e\u7eed\u9700\u8981\u8c03\u7528\uff1a<\/p>\n

[root@linuxprobe zlib-1.2.8]# cd ..\r\n[root@linuxprobe src]# useradd www -s \/sbin\/nologin\r\n<\/pre>\n

\u5728\u4f7f\u7528\u547d\u4ee4\u7f16\u8bd1Nginx\u670d\u52a1\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u8bbe\u7f6e\u7279\u522b\u591a\u7684\u53c2\u6570\uff0c\u5176\u4e2d\uff0c--prefix\u53c2\u6570\u7528\u4e8e\u5b9a\u4e49\u670d\u52a1\u7a0b\u5e8f\u7a0d\u540e\u5b89\u88c5\u5230\u7684\u4f4d\u7f6e\uff0c--user\u4e0e--group\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u6267\u884cNginx\u670d\u52a1\u7a0b\u5e8f\u7684\u7528\u6237\u540d\u548c\u7528\u6237\u7ec4\u3002\u5728\u4f7f\u7528\u53c2\u6570\u8c03\u7528openssl\u3001zlib\u3001pcre\u8f6f\u4ef6\u5305\u65f6\uff0c\u8bf7\u5199\u51fa\u8f6f\u4ef6\u6e90\u7801\u5305\u7684\u89e3\u538b\u8def\u5f84\uff0c\u800c\u4e0d\u662f\u7a0b\u5e8f\u7684\u5b89\u88c5\u8def\u5f84\uff1a<\/p>\n

[root@linuxprobe src]# tar xzvf nginx-1.6.0.tar.gz \r\n[root@linuxprobe src]# cd nginx-1.6.0\/\r\n[root@linuxprobe nginx-1.6.0]# .\/configure --prefix=\/usr\/local\/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=\/usr\/local\/src\/openssl-1.0.1h --with-zlib=\/usr\/local\/src\/zlib-1.2.8 --with-pcre=\/usr\/local\/src\/pcre-8.35\r\n[root@linuxprobe nginx-1.6.0]# make\r\n[root@linuxprobe nginx-1.6.0]# make install\r\n<\/pre>\n

\u8981\u60f3\u542f\u52a8Nginx\u670d\u52a1\u7a0b\u5e8f\u4ee5\u53ca\u5c06\u5176\u52a0\u5165\u5230\u5f00\u673a\u542f\u52a8\u9879\u4e2d\uff0c\u4e5f\u9700\u8981\u6709\u811a\u672c\u6587\u4ef6\u3002\u53ef\u60dc\u7684\u662f\uff0c\u5728\u5b89\u88c5\u5b8cNginx\u8f6f\u4ef6\u5305\u4e4b\u540e\u9ed8\u8ba4\u5e76\u6ca1\u6709\u4e3a\u7528\u6237\u63d0\u4f9b\u811a\u672c\u6587\u4ef6\uff0c\u56e0\u6b64\u5218\u9044\u8001\u5e08\u7ed9\u5404\u4f4d\u8bfb\u8005\u51c6\u5907\u4e86\u4e00\u4efd\u53ef\u7528\u7684\u542f\u52a8\u811a\u672c\u6587\u4ef6\uff0c\u5927\u5bb6\u53ea\u9700\u5728\/etc\/rc.d\/init.d\u76ee\u5f55\u4e2d\u521b\u5efa\u811a\u672c\u6587\u4ef6\u5e76\u76f4\u63a5\u590d\u5236\u4e0b\u9762\u7684\u811a\u672c\u5185\u5bb9\u5373\u53ef\uff08\u76f8\u4fe1\u5404\u4f4d\u8bfb\u8005\u5728\u638c\u63e1\u4e86\u7b2c4\u7ae0\u7684\u5185\u5bb9\u4e4b\u540e\uff0c\u5e94\u8be5\u53ef\u4ee5\u987a\u5229\u770b\u61c2\u8fd9\u4e2a\u811a\u672c\u6587\u4ef6\uff09\u3002<\/p>\n

[root@linuxprobe nginx-1.6.0]# vim \/etc\/rc.d\/init.d\/nginx<\/strong>\r\n#!\/bin\/bash\r\n# nginx - this script starts and stops the nginx daemon\r\n# chkconfig: - 85 15\r\n# description: Nginx is an HTTP(S) server, HTTP(S) reverse \\\r\n# proxy and IMAP\/POP3 proxy server\r\n# processname: nginx\r\n# config: \/etc\/nginx\/nginx.conf\r\n# config: \/usr\/local\/nginx\/conf\/nginx.conf\r\n# pidfile: \/usr\/local\/nginx\/logs\/nginx.pid\r\n# Source function library.\r\n. \/etc\/rc.d\/init.d\/functions\r\n# Source networking configuration.\r\n. \/etc\/sysconfig\/network\r\n# Check that networking is up.\r\n[ \"$NETWORKING\" = \"no\" ] && exit 0\r\nnginx=\"\/usr\/local\/nginx\/sbin\/nginx\"\r\nprog=$(basename $nginx)\r\nNGINX_CONF_FILE=\"\/usr\/local\/nginx\/conf\/nginx.conf\"\r\n[ -f \/etc\/sysconfig\/nginx ] && . \/etc\/sysconfig\/nginx\r\nlockfile=\/var\/lock\/subsys\/nginx\r\nmake_dirs() {\r\n# make required directories\r\nuser=`$nginx -V 2>&1 | grep \"configure arguments:\" | sed 's\/[^*]*--user=\\([^ ]*\\).*\/\\1\/g' -`\r\n        if [ -z \"`grep $user \/etc\/passwd`\" ]; then\r\n                useradd -M -s \/bin\/nologin $user\r\n        fi\r\noptions=`$nginx -V 2>&1 | grep 'configure arguments:'`\r\nfor opt in $options; do\r\n        if [ `echo $opt | grep '.*-temp-path'` ]; then\r\n                value=`echo $opt | cut -d \"=\" -f 2`\r\n                if [ ! -d \"$value\" ]; then\r\n                        # echo \"creating\" $value\r\n                        mkdir -p $value && chown -R $user $value\r\n                fi\r\n        fi\r\ndone\r\n}\r\nstart() {\r\n[ -x $nginx ] || exit 5\r\n[ -f $NGINX_CONF_FILE ] || exit 6\r\nmake_dirs\r\necho -n $\"Starting $prog: \"\r\ndaemon $nginx -c $NGINX_CONF_FILE\r\nretval=$?\r\necho\r\n[ $retval -eq 0 ] && touch $lockfile\r\nreturn $retval\r\n}\r\nstop() {\r\necho -n $\"Stopping $prog: \"\r\nkillproc $prog -QUIT\r\nretval=$?\r\necho\r\n[ $retval -eq 0 ] && rm -f $lockfile\r\nreturn $retval\r\n}\r\nrestart() {\r\n#configtest || return $?\r\nstop\r\nsleep 1\r\nstart\r\n}\r\nreload() {\r\n#configtest || return $?\r\necho -n $\"Reloading $prog: \"\r\nkillproc $nginx -HUP\r\nRETVAL=$?\r\necho\r\n}\r\nforce_reload() {\r\nrestart\r\n}\r\nconfigtest() {\r\n$nginx -t -c $NGINX_CONF_FILE\r\n}\r\nrh_status() {\r\nstatus $prog\r\n}\r\nrh_status_q() {\r\nrh_status >\/dev\/null 2>&1\r\n}\r\ncase \"$1\" in\r\nstart)\r\n        rh_status_q && exit 0\r\n        $1\r\n        ;;\r\nstop)\r\n        rh_status_q || exit 0\r\n        $1\r\n        ;;\r\nrestart|configtest)\r\n$1\r\n;;\r\nreload)\r\n        rh_status_q || exit 7\r\n        $1\r\n        ;;\r\nforce-reload)\r\n        force_reload\r\n        ;;\r\nstatus)\r\n        rh_status\r\n        ;;\r\ncondrestart|try-restart)\r\n        rh_status_q || exit 0\r\n        ;;\r\n*)\r\necho $\"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}\"\r\nexit 2\r\nesac\r\n<\/pre>\n

\u4fdd\u5b58\u811a\u672c\u6587\u4ef6\u540e\u8bb0\u5f97\u4e3a\u5176\u8d4b\u4e88755\u6743\u9650\uff0c\u4ee5\u4fbf\u80fd\u591f\u6267\u884c\u8fd9\u4e2a\u811a\u672c\u3002\u7136\u540e\u4ee5\u7edd\u5bf9\u8def\u5f84\u7684\u65b9\u5f0f\u6267\u884c\u8fd9\u4e2a\u811a\u672c\uff0c\u901a\u8fc7restart\u53c2\u6570\u91cd\u542fNginx\u670d\u52a1\u7a0b\u5e8f\uff0c\u6700\u540e\u518d\u4f7f\u7528chkconfig\u547d\u4ee4\u5c06Nginx\u670d\u52a1\u7a0b\u5e8f\u6dfb\u52a0\u81f3\u5f00\u673a\u542f\u52a8\u9879\u4e2d\u3002\u5927\u529f\u544a\u6210\uff01<\/p>\n

[root@linuxprobe nginx-1.6.0]# chmod 755 \/etc\/rc.d\/init.d\/nginx\r\n[root@linuxprobe nginx-1.6.0]# \/etc\/rc.d\/init.d\/nginx restart\r\nRestarting nginx (via systemctl):                          [  OK  ]\r\n[root@linuxprobe nginx-1.6.0]# chkconfig nginx on\r\n<\/pre>\n

Nginx\u670d\u52a1\u7a0b\u5e8f\u5728\u542f\u52a8\u540e\u5c31\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u670d\u52a1\u5668\u7684IP\u5730\u5740\u6765\u67e5\u770b\u5230\u9ed8\u8ba4\u7f51\u9875\u4e86\u3002\u76f8\u8f83\u4e8eApache\u670d\u52a1\u7a0b\u5e8f\u7684\u7ea2\u8272\u9ed8\u8ba4\u9875\u9762\uff0cNginx\u670d\u52a1\u7a0b\u5e8f\u7684\u9ed8\u8ba4\u9875\u9762\u663e\u5f97\u66f4\u52a0\u7b80\u6d01\uff0c\u5982\u56fe20-2\u6240\u793a\u3002<\/p>\n

\"\u5c1d\u8bd5\u8bbf\u95ee\u7f51\u9875\"<\/p>\n

\u56fe20-3 \u00a0Nginx\u670d\u52a1\u7a0b\u5e8f\u7684\u9ed8\u8ba4\u9875\u9762<\/p>\n

20.2.3 \u914d\u7f6ephp\u670d\u52a1<\/strong><\/span><\/h6>\n

PHP\uff08Hypertxt Preprocessor\uff0c\u8d85\u6587\u672c\u9884\u5904\u7406\u5668\uff09\u662f\u4e00\u79cd\u901a\u7528\u7684\u5f00\u6e90\u811a\u672c\u8bed\u8a00\uff0c\u53d1\u660e\u4e8e1995\u5e74\uff0c\u5b83\u5438\u53d6\u4e86C\u8bed\u8a00\u3001Java\u8bed\u8a00\u53caPerl\u8bed\u8a00\u7684\u5f88\u591a\u4f18\u70b9\uff0c\u5177\u6709\u5f00\u6e90\u3001\u514d\u8d39\u3001\u5feb\u6377\u3001\u8de8\u5e73\u53f0\u6027\u5f3a\u3001\u6548\u7387\u9ad8\u7b49\u4f18\u826f\u7279\u6027\uff0c\u662f\u76ee\u524dWeb\u5f00\u53d1\u9886\u57df\u6700\u5e38\u7528\u7684\u8bed\u8a00\u4e4b\u4e00\u3002\u672c\u4e66\u7684\u914d\u5957\u7ad9\u70b9\u5c31\u662f\u57fa\u4e8ePHP\u8bed\u8a00\u7f16\u5199\u7684\u3002<\/p>\n

\u4f7f\u7528\u6e90\u7801\u5305\u7684\u65b9\u5f0f\u7f16\u8bd1\u5b89\u88c5PHP\u8bed\u8a00\u73af\u5883\u5176\u5b9e\u5e76\u4e0d\u590d\u6742\uff0c\u96be\u70b9\u5728\u4e8e\u89e3\u51b3PHP\u7684\u7a0b\u5e8f\u5305\u548c\u5176\u4ed6\u8f6f\u4ef6\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u4e3a\u6b64\u9700\u8981\u5148\u5b89\u88c5\u90e8\u7f72\u5c06\u8fd1\u5341\u4e2a\u7528\u4e8e\u642d\u5efa\u7f51\u7ad9\u9875\u9762\u7684\u8f6f\u4ef6\u7a0b\u5e8f\u5305\uff0c\u7136\u540e\u624d\u80fd\u6b63\u5f0f\u5b89\u88c5PHP\u7a0b\u5e8f\u3002<\/p>\n

yasm\u6e90\u7801\u5305\u662f\u4e00\u6b3e\u5e38\u89c1\u7684\u5f00\u6e90\u6c47\u7f16\u5668\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe nginx-1.6.0]# cd ..\r\n[root@linuxprobe src]# tar zxvf yasm-1.2.0.tar.gz\r\n[root@linuxprobe src]# cd yasm-1.2.0\r\n[root@linuxprobe yasm-1.2.0]# .\/configure\r\n[root@linuxprobe yasm-1.2.0]# make\r\n[root@linuxprobe yasm-1.2.0]# make install\r\n<\/pre>\n

libmcrypt\u6e90\u7801\u5305\u662f\u7528\u4e8e\u52a0\u5bc6\u7b97\u6cd5\u7684\u6269\u5c55\u5e93\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe yasm-1.2.0]# cd ..\r\n[root@linuxprobe src]# tar zxvf libmcrypt-2.5.8.tar.gz\r\n[root@linuxprobe src]# cd libmcrypt-2.5.8\r\n[root@linuxprobe libmcrypt-2.5.8]# .\/configure\r\n[root@linuxprobe libmcrypt-2.5.8]# make\r\n[root@linuxprobe libmcrypt-2.5.8]# make install\r\n<\/pre>\n

libvpx\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u89c6\u9891\u7f16\u7801\u5668\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\u3002\u76f8\u4fe1\u4f1a\u6709\u5f88\u591a\u7c97\u5fc3\u7684\u8bfb\u8005\u987a\u624b\u4f7f\u7528\u4e86tar\u547d\u4ee4\u7684xzvf\u53c2\u6570\uff0c\u4f46\u5982\u679c\u4ed4\u7ec6\u89c2\u5bdf\u5c31\u4f1a\u53d1\u73b0libvpx\u6e90\u7801\u5305\u7684\u540e\u7f00\u662f.tar.bz2\uff0c\u5373\u8868\u793a\u4f7f\u7528bzip2\u683c\u5f0f\u8fdb\u884c\u7684\u538b\u7f29\uff0c\u56e0\u6b64\u6b63\u786e\u7684\u89e3\u538b\u53c2\u6570\u5e94\u8be5\u662fxjvf\uff1a<\/p>\n

[root@linuxprobe libmcrypt-2.5.8]# cd ..\r\n[root@linuxprobe src]# tar xjvf libvpx-v1.3.0.tar.bz2\r\n[root@linuxprobe src]# cd libvpx-v1.3.0\r\n[root@linuxprobe libvpx-v1.3.0]# .\/configure --prefix=\/usr\/local\/libvpx --enable-shared --enable-vp9\r\n[root@linuxprobe libvpx-v1.3.0]# make\r\n[root@linuxprobe libvpx-v1.3.0]# make install\r\n<\/pre>\n

tiff\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u6807\u7b7e\u56fe\u50cf\u6587\u4ef6\u683c\u5f0f\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe libvpx-v1.3.0]# cd ..\r\n[root@linuxprobe src]# tar zxvf tiff-4.0.3.tar.gz\r\n[root@linuxprobe src]# cd tiff-4.0.3\r\n[root@linuxprobe tiff-4.0.3]# .\/configure --prefix=\/usr\/local\/tiff --enable-shared\r\n[root@linuxprobe tiff-4.0.3]# make\r\n[root@linuxprobe tiff-4.0.3]# make install\r\n<\/pre>\n

libpng\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9bpng\u56fe\u7247\u683c\u5f0f\u652f\u6301\u51fd\u6570\u5e93\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe tiff-4.0.3]# cd ..\r\n[root@linuxprobe src]# tar zxvf libpng-1.6.12.tar.gz\r\n[root@linuxprobe src]# cd libpng-1.6.12\r\n[root@linuxprobe libpng-1.6.12]# .\/configure --prefix=\/usr\/local\/libpng --enable-shared\r\n[root@linuxprobe libpng-1.6.12]# make\r\n[root@linuxprobe libpng-1.6.12]# make install\r\n<\/pre>\n

freetype\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u5b57\u4f53\u652f\u6301\u5f15\u64ce\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe libpng-1.6.12]# cd ..\r\n[root@linuxprobe src]# tar zxvf freetype-2.5.3.tar.gz\r\n[root@linuxprobe src]# cd freetype-2.5.3\r\n[root@linuxprobe freetype-2.5.3]# .\/configure --prefix=\/usr\/local\/freetype --enable-shared\r\n[root@linuxprobe freetype-2.5.3]# make\r\n[root@linuxprobe freetype-2.5.3]# make install\r\n<\/pre>\n

jpeg\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9bjpeg\u56fe\u7247\u683c\u5f0f\u652f\u6301\u51fd\u6570\u5e93\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\uff1a<\/p>\n

[root@linuxprobe freetype-2.5.3]# cd ..\r\n[root@linuxprobe src]# tar zxvf jpegsrc.v9a.tar.gz\r\n[root@linuxprobe src]# cd jpeg-9a\r\n[root@linuxprobe jpeg-9a]# .\/configure --prefix=\/usr\/local\/jpeg --enable-shared\r\n[root@linuxprobe jpeg-9a]# make\r\n[root@linuxprobe jpeg-9a]# make install\r\n<\/pre>\n

libgd\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u56fe\u5f62\u5904\u7406\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\u3002\u5728\u7f16\u8bd1libgd\u6e90\u7801\u5305\u65f6\uff0c\u8bf7\u8bb0\u5f97\u5199\u5165\u7684\u662fjpeg\u3001libpng\u3001freetype\u3001tiff\u3001libvpx\u7b49\u670d\u52a1\u7a0b\u5e8f\u5728\u7cfb\u7edf\u4e2d\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u5373\u5728\u4e0a\u9762\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4f7f\u7528--prefix\u53c2\u6570\u6307\u5b9a\u7684\u76ee\u5f55\u8def\u5f84\uff1a<\/p>\n

[root@linuxprobe jpeg-9a]# cd ..\r\n[root@linuxprobe src]# tar zxvf libgd-2.1.0.tar.gz\r\n[root@linuxprobe src]# cd libgd-2.1.0\r\n[root@linuxprobe libgd-2.1.0]# .\/configure --prefix=\/usr\/local\/libgd --enable-shared --with-jpeg=\/usr\/local\/jpeg --with-png=\/usr\/local\/libpng --with-freetype=\/usr\/local\/freetype --with-fontconfig=\/usr\/local\/freetype --with-xpm=\/usr\/ --with-tiff=\/usr\/local\/tiff --with-vpx=\/usr\/local\/libvpx\r\n[root@linuxprobe libgd-2.1.0]# make\r\n[root@linuxprobe libgd-2.1.0]# make install\r\n<\/pre>\n

t1lib\u6e90\u7801\u5305\u662f\u7528\u4e8e\u63d0\u4f9b\u56fe\u7247\u751f\u6210\u51fd\u6570\u5e93\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5176\u89e3\u538b\u3001\u7f16\u8bd1\u3001\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u8f93\u51fa\u4fe1\u606f\u5747\u5df2\u7701\u7565\u3002\u5b89\u88c5\u540e\u628a\/usr\/lib64\u76ee\u5f55\u4e2d\u7684\u51fd\u6570\u6587\u4ef6\u94fe\u63a5\u5230\/usr\/lib\u76ee\u5f55\u4e2d\uff0c\u4ee5\u4fbf\u7cfb\u7edf\u80fd\u591f\u987a\u5229\u8c03\u53d6\u5230\u51fd\u6570\u6587\u4ef6\uff1a<\/p>\n

[root@linuxprobe cd libgd-2.1.0]# cd ..\r\n[root@linuxprobe src]# tar zxvf t1lib-5.1.2.tar.gz\r\n[root@linuxprobe src]# cd t1lib-5.1.2\r\n[root@linuxprobe t1lib-5.1.2]# .\/configure --prefix=\/usr\/local\/t1lib --enable-shared\r\n[root@linuxprobe t1lib-5.1.2]# make\r\n[root@linuxprobe t1lib-5.1.2]# make install\r\n[root@linuxprobe t1lib-5.1.2]# ln -s \/usr\/lib64\/libltdl.so \/usr\/lib\/libltdl.so \r\n[root@linuxprobe t1lib-5.1.2]# cp -frp \/usr\/lib64\/libXpm.so* \/usr\/lib\/<\/pre>\n

\u6b64\u65f6\u7ec8\u4e8e\u628a\u7f16\u8bd1php\u670d\u52a1\u6e90\u7801\u5305\u7684\u76f8\u5173\u8f6f\u4ef6\u5305\u90fd\u5df2\u7ecf\u5b89\u88c5\u90e8\u7f72\u59a5\u5f53\u4e86\u3002\u5728\u5f00\u59cb\u7f16\u8bd1php\u6e90\u7801\u5305\u4e4b\u524d\uff0c\u5148\u5b9a\u4e49\u4e00\u4e2a\u540d\u4e3aLD_LIBRARY_PATH\u7684\u5168\u5c40\u73af\u5883\u53d8\u91cf\uff0c\u8be5\u73af\u5883\u53d8\u91cf\u7684\u4f5c\u7528\u662f\u5e2e\u52a9\u7cfb\u7edf\u627e\u5230\u6307\u5b9a\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u6587\u4ef6\uff0c\u8fd9\u4e9b\u6587\u4ef6\u662f\u7f16\u8bd1php\u670d\u52a1\u6e90\u7801\u5305\u7684\u5fc5\u987b\u5143\u7d20\u4e4b\u4e00\u3002\u7f16\u8bd1php\u670d\u52a1\u6e90\u7801\u5305\u65f6\uff0c\u9664\u4e86\u5b9a\u4e49\u8981\u5b89\u88c5\u5230\u7684\u76ee\u5f55\u4ee5\u5916\uff0c\u8fd8\u9700\u8981\u4f9d\u6b21\u5b9a\u4e49\u914d\u7f6ephp\u670d\u52a1\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\u7684\u4fdd\u5b58\u76ee\u5f55\u3001MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u6240\u5728\u76ee\u5f55\u3001MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u4ee5\u53calibpng\u3001jpeg\u3001freetype\u3001libvpx\u3001zlib\u3001t1lib\u7b49\u670d\u52a1\u7a0b\u5e8f\u7684\u5b89\u88c5\u76ee\u5f55\u8def\u5f84\uff0c\u5e76\u901a\u8fc7\u53c2\u6570\u542f\u52a8php\u670d\u52a1\u7a0b\u5e8f\u7684\u8bf8\u591a\u9ed8\u8ba4\u529f\u80fd\uff1a<\/p>\n

[root@linuxprobe t1lib-5.1.2]# cd ..\r\n[root@linuxprobe src]# tar -zvxf php-5.5.14.tar.gz\r\n[root@linuxprobe src]# cd php-5.5.14\r\n[root@linuxprobe php-5.5.14]# export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib\r\n[root@linuxprobe php-5.5.14]# .\/configure --prefix=\/usr\/local\/php --with-config-file-path=\/usr\/local\/php\/etc --with-mysql=\/usr\/local\/mysql --with-mysqli=\/usr\/local\/mysql\/bin\/mysql_config --with-mysql-sock=\/tmp\/mysql.sock --with-pdo-mysql=\/usr\/local\/mysql --with-gd --with-png-dir=\/usr\/local\/libpng --with-jpeg-dir=\/usr\/local\/jpeg --with-freetype-dir=\/usr\/local\/freetype --with-xpm-dir=\/usr\/ --with-vpx-dir=\/usr\/local\/libvpx\/ --with-zlib-dir=\/usr\/local\/zlib --with-t1lib=\/usr\/local\/t1lib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --enable-ctype\u00a0\r\n[root@linuxprobe php-5.5.14]# make\r\n[root@linuxprobe php-5.5.14]# make install\r\n<\/pre>\n

\u5728php\u6e90\u7801\u5305\u7a0b\u5e8f\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u5220\u9664\u5f53\u524d\u9ed8\u8ba4\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u5c06php\u670d\u52a1\u7a0b\u5e8f\u76ee\u5f55\u4e2d\u76f8\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u590d\u5236\u8fc7\u6765\uff1a<\/p>\n

[root@linuxprobe php-5.5.14]# rm -rf \/etc\/php.ini\r\n[root@linuxprobe php-5.5.14]# ln -s \/usr\/local\/php\/etc\/php.ini \/etc\/php.ini\r\n[root@linuxprobe php-5.5.14]# cp php.ini-production \/usr\/local\/php\/etc\/php.ini\r\n[root@linuxprobe php-5.5.14]# cp \/usr\/local\/php\/etc\/php-fpm.conf.default \/usr\/local\/php\/etc\/php-fpm.conf\r\n[root@linuxprobe php-5.5.14]# ln -s \/usr\/local\/php\/etc\/php-fpm.conf \/etc\/php-fpm.conf<\/pre>\n

php-fpm.conf\u662fphp\u670d\u52a1\u7a0b\u5e8f\u91cd\u8981\u7684\u914d\u7f6e\u6587\u4ef6\u4e4b\u4e00\uff0c\u6211\u4eec\u9700\u8981\u542f\u7528\u8be5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7b2c25\u884c\u5de6\u53f3\u7684pid\u6587\u4ef6\u4fdd\u5b58\u76ee\u5f55\uff0c\u7136\u540e\u5206\u522b\u5c06\u7b2c148\u548c149\u884c\u7684user\u4e0egroup\u53c2\u6570\u5206\u522b\u4fee\u6539\u4e3awww\u8d26\u6237\u548c\u7528\u6237\u7ec4\u540d\u79f0\uff1a<\/p>\n

[root@linuxprobe php-5.5.14]# vim \/usr\/local\/php\/etc\/php-fpm.conf\r\n1 ;;;;;;;;;;;;;;;;;;;;;\r\n2 ; FPM Configuration ;\r\n3 ;;;;;;;;;;;;;;;;;;;;;\r\n4 \r\n5 ; All relative paths in this configuration file are relative to PHP's instal l\r\n6 ; prefix (\/usr\/local\/php). This prefix can be dynamically changed by using t he\r\n7 ; '-p' argument from the command line.\r\n8 \r\n9 ; Include one or more files. If glob(3) exists, it is used to include a bunc h of\r\n10 ; files from a glob(3) pattern. This directive can be used everywhere in the\r\n11 ; file.\r\n12 ; Relative path can also be used. They will be prefixed by:\r\n13 ; - the global prefix if it's been set (-p argument)\r\n14 ; - \/usr\/local\/php otherwise\r\n15 ;include=etc\/fpm.d\/*.conf\r\n16 \r\n17 ;;;;;;;;;;;;;;;;;;\r\n18 ; Global Options ;\r\n19 ;;;;;;;;;;;;;;;;;;\r\n20 \r\n21 [global]\r\n22 ; Pid file\r\n23 ; Note: the default prefix is \/usr\/local\/php\/var\r\n24 ; Default Value: none\r\n25 pid = run\/php-fpm.pid<\/strong>\r\n26 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n145 ; Unix user\/group of processes\r\n146 ; Note: The user is mandatory. If the group is not set, the default user's g roup\r\n147 ; will be used.\r\n148 user = www<\/strong>\r\n149 group = www<\/strong>\r\n150 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n

\u914d\u7f6e\u59a5\u5f53\u540e\u4fbf\u53ef\u628a\u7528\u4e8e\u7ba1\u7406php\u670d\u52a1\u7684\u811a\u672c\u6587\u4ef6\u590d\u5236\u5230\/etc\/rc.d\/init.d\u4e2d\u4e86\u3002\u4e3a\u4e86\u80fd\u591f\u6267\u884c\u811a\u672c\uff0c\u8bf7\u8bb0\u5f97\u4e3a\u811a\u672c\u8d4b\u4e88755\u6743\u9650\u3002\u6700\u540e\u628aphp-fpm\u670d\u52a1\u7a0b\u5e8f\u52a0\u5165\u5230\u5f00\u673a\u542f\u52a8\u9879\u4e2d\uff1a<\/p>\n

[root@linuxprobe php-5.5.14]# cp sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php-fpm\r\n[root@linuxprobe php-5.5.14]# chmod 755 \/etc\/rc.d\/init.d\/php-fpm\r\n[root@linuxprobe php-5.5.14]# chkconfig php-fpm on\r\n<\/pre>\n

\u7531\u4e8ephp\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u53c2\u6570\u76f4\u63a5\u4f1a\u5f71\u54cd\u5230Web\u670d\u52a1\u670d\u52a1\u7684\u8fd0\u884c\u73af\u5883\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u9ed8\u8ba4\u5f00\u542f\u4e86\u4e00\u4e9b\u4e0d\u5fc5\u8981\u4e14\u9ad8\u5371\u7684\u529f\u80fd\uff08\u5982\u5141\u8bb8\u7528\u6237\u5728\u7f51\u9875\u4e2d\u6267\u884cLinux\u547d\u4ee4\uff09\uff0c\u5219\u4f1a\u964d\u4f4e\u7f51\u7ad9\u88ab\u5165\u4fb5\u7684\u96be\u5ea6\uff0c\u5165\u4fb5\u4eba\u5458\u751a\u81f3\u53ef\u4ee5\u62ff\u5230\u6574\u53f0Web\u670d\u52a1\u5668\u7684\u7ba1\u7406\u6743\u9650\u3002\u56e0\u6b64\u6211\u4eec\u9700\u8981\u7f16\u8f91php.ini\u914d\u7f6e\u6587\u4ef6\uff0c\u5728305\u884c\u7684disable_functions\u53c2\u6570\u540e\u9762\u8ffd\u52a0\u4e0a\u8981\u7981\u6b62\u7684\u529f\u80fd\u3002\u4e0b\u9762\u7684\u7981\u7528\u529f\u80fd\u540d\u5355\u662f\u5218\u9044\u8001\u5e08\u4f9d\u636e\u7f51\u7ad9\u8fd0\u884c\u7684\u7ecf\u9a8c\u800c\u5b9a\u5236\u7684\uff0c\u4e0d\u89c1\u5f97\u9002\u5408\u6bcf\u4e2a\u751f\u4ea7\u73af\u5883\uff0c\u5efa\u8bae\u5927\u5bb6\u5728\u6b64\u57fa\u7840\u4e0a\u6839\u636e\u81ea\u8eab\u5de5\u4f5c\u9700\u6c42\u914c\u60c5\u5220\u51cf\uff1a<\/p>\n

[root@linuxprobe php-5.5.14]# vim \/usr\/local\/php\/etc\/php.ini\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n300 \r\n301 ; This directive allows you to disable certain functions for security reasons.\r\n302 ; It receives a comma-delimited list of function names. This directive is\r\n303 ; *NOT* affected by whether Safe Mode is turned On or Off.\r\n304 ; http:\/\/php.net\/disable-functions\r\n305 disable_functions =<\/strong> passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restor e,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,g etservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,po six_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_ getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_ setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname\r\n306 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n

\u8fd9\u6837\u5c31\u628aphp\u670d\u52a1\u7a0b\u5e8f\u914d\u7f6e\u59a5\u5f53\u4e86\u3002\u6700\u540e\uff0c\u8fd8\u9700\u8981\u7f16\u8f91Nginx\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\uff0c\u628a\u7b2c2\u884c\u7684\u4e95\u53f7\uff08#\uff09\u5220\u9664\uff0c\u7136\u540e\u5728\u540e\u9762\u5199\u4e0a\u8d1f\u8d23\u8fd0\u884cNginx\u670d\u52a1\u7a0b\u5e8f\u7684\u8d26\u6237\u540d\u79f0\u548c\u7528\u6237\u7ec4\u540d\u79f0\uff1b\u5728\u7b2c45\u884c\u7684index\u53c2\u6570\u540e\u9762\u5199\u4e0a\u7f51\u7ad9\u7684\u9996\u9875\u540d\u79f0\u3002\u6700\u540e\u662f\u5c06\u7b2c65\uff5e71\u884c\u53c2\u6570\u524d\u7684\u4e95\u53f7\uff08#\uff09\u5220\u9664\u6765\u542f\u7528\u53c2\u6570\uff0c\u4e3b\u8981\u662f\u4fee\u6539\u7b2c69\u884c\u7684\u811a\u672c\u540d\u79f0\u8def\u5f84\u53c2\u6570\uff0c\u5176\u4e2d$document_root\u53d8\u91cf\u5373\u4e3a\u7f51\u7ad9\u4fe1\u606f\u5b58\u50a8\u7684\u6839\u76ee\u5f55\u8def\u5f84\uff0c\u82e5\u6ca1\u6709\u8bbe\u7f6e\u8be5\u53d8\u91cf\uff0c\u5219Nginx\u670d\u52a1\u7a0b\u5e8f\u65e0\u6cd5\u627e\u5230\u7f51\u7ad9\u4fe1\u606f\uff0c\u56e0\u6b64\u4f1a\u63d0\u793a\u201c404\u9875\u9762\u672a\u627e\u5230\u201d\u7684\u62a5\u9519\u4fe1\u606f\u3002\u5728\u786e\u8ba4\u53c2\u6570\u4fe1\u606f\u586b\u5199\u6b63\u786e\u540e\u4fbf\u53ef\u91cd\u542fNginx\u670d\u52a1\u4e0ephp-fpm\u670d\u52a1\u3002<\/p>\n

[root@linuxprobe php-5.5.14]# vim \/usr\/local\/nginx\/conf\/nginx.conf\r\n 1 \r\n 2 user www www;<\/strong>\r\n 3 worker_processes 1;\r\n 4 \r\n 5 #error_log logs\/error.log;\r\n 6 #error_log logs\/error.log notice;\r\n 7 #error_log logs\/error.log info;\r\n 8 \r\n 9 #pid logs\/nginx.pid;\r\n 10 \r\n 11 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n 40 \r\n 41 #access_log logs\/host.access.log main;\r\n 42 \r\n 43 location \/ {\r\n 44 root html;\r\n 45 index index.html index.htm index.php;<\/strong>\r\n 46 }\r\n 47 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n 62 \r\n 63 #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n 64 \r\n 65 location ~ \\.php$ {\r\n 66 root html;\r\n 67 fastcgi_pass 127.0.0.1:9000;\r\n 68 fastcgi_index index.php;\r\n 69 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<\/strong>\r\n 70 include fastcgi_params;\r\n 71 }\r\n 72 \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\n[root@linuxprobe php-5.5.14]# systemctl restart nginx\r\n[root@linuxprobe php-5.5.14]# systemctl restart php-fpm<\/pre>\n

\u81f3\u6b64\uff0cLNMP\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u67b6\u6784\u7684\u914d\u7f6e\u5b9e\u9a8c\u5168\u90e8\u7ed3\u675f\u3002<\/p>\n

20.3 \u642d\u5efaDiscuz\u8bba\u575b<\/strong><\/span><\/h5>\n

\u4e3a\u4e86\u68c0\u9a8cLNMP\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u662f\u5426\u914d\u7f6e\u59a5\u5f53\uff0c\u53ef\u4ee5\u4f7f\u7528\u5728\u4e0a\u9762\u90e8\u7f72Discuz!\u7cfb\u7edf\uff0c\u7136\u540e\u67e5\u770b\u7ed3\u679c\u3002\u5982\u679c\u80fd\u591f\u5728LNMP\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u4e2d\u6210\u529f\u5b89\u88c5\u4f7f\u7528Discuz!\u8bba\u575b\u7cfb\u7edf\uff0c\u4e5f\u5c31\u610f\u5473\u7740\u8fd9\u5957\u67b6\u6784\u662f\u53ef\u7528\u7684\u3002Discuz! X3.2\u662f\u56fd\u5185\u6700\u5e38\u89c1\u7684\u793e\u533a\u8bba\u575b\u7cfb\u7edf\uff0c\u5728\u7ecf\u8fc7\u5341\u591a\u5e74\u7684\u7814\u53d1\u540e\u5df2\u7ecf\u6210\u4e3a\u4e86\u5168\u7403\u6210\u719f\u5ea6\u6700\u9ad8\u3001\u8986\u76d6\u7387\u6700\u5e7f\u7684\u8bba\u575b\u7f51\u7ad9\u7cfb\u7edf\u4e4b\u4e00\u3002<\/p>\n

Discuz! X3.2\u8f6f\u4ef6\u5305\u7684\u540e\u7f00\u662f.zip\u683c\u5f0f\uff0c\u56e0\u6b64\u5e94\u5f53\u4f7f\u7528\u4e13\u7528\u7684unzip\u547d\u4ee4\u6765\u8fdb\u884c\u89e3\u538b\u3002\u89e3\u538b\u540e\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u51fa\u73b0\u4e00\u4e2a\u540d\u4e3aupload\u7684\u6587\u4ef6\u76ee\u5f55\uff0c\u8fd9\u91cc\u9762\u4fdd\u5b58\u7684\u5c31\u662fDiscuz\uff01\u8bba\u575b\u7684\u7cfb\u7edf\u7a0b\u5e8f\u3002\u6211\u4eec\u628aNginx\u670d\u52a1\u7a0b\u5e8f\u7f51\u7ad9\u6839\u76ee\u5f55\u7684\u5185\u5bb9\u6e05\u7a7a\u540e\uff0c\u5c31\u53ef\u4ee5\u628a\u8fd9\u4e9b\u8fd9\u4e2a\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u90fd\u590d\u5236\u8fdb\u53bb\u4e86\u3002\u8bb0\u5f97\u628aNginx\u670d\u52a1\u7a0b\u5e8f\u7684\u7f51\u7ad9\u6839\u76ee\u5f55\u7684\u6240\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u4fee\u6539\u4e3a\u672c\u5730\u7684www\u7528\u6237\uff08\u5df2\u572820.2.2\u5c0f\u8282\u521b\u5efa\uff09\uff0c\u5e76\u4e3a\u5176\u8d4b\u4e88755\u6743\u9650\u4ee5\u4fbf\u4e8e\u80fd\u591f\u8bfb\u3001\u5199\u3001\u6267\u884c\u8be5\u8bba\u575b\u7cfb\u7edf\u5185\u7684\u6587\u4ef6\u3002<\/p>\n

[root@linuxprobe php-5.5.14 ]# cd \/usr\/local\/src\/\r\n[root@linuxprobe src]# unzip Discuz_X3.2_SC_GBK.zip\r\n[root@linuxprobe src]# rm -rf \/usr\/local\/nginx\/html\/{index.html,50x.html}*\r\n[root@linuxprobe src]# mv upload\/* \/usr\/local\/nginx\/html\/\r\n[root@linuxprobe src]# chown -Rf www:www \/usr\/local\/nginx\/html\r\n[root@linuxprobe src]# chmod -Rf 755 \/usr\/local\/nginx\/html\r\n<\/pre>\n

\u7b2c1\u6b65<\/strong>\uff1a\u63a5\u53d7Discuz!\u5b89\u88c5\u5411\u5bfc\u7684\u8bb8\u53ef\u534f\u8bae\u3002\u5728\u628aDiscuz!\u8bba\u575b\u7cfb\u7edf\u7a0b\u5e8f\uff08\u5373\u521a\u624dupload\u76ee\u5f55\u4e2d\u7684\u5185\u5bb9\uff09\u590d\u5236Nginx\u670d\u52a1\u7f51\u7ad9\u6839\u76ee\u5f55\u540e\u4fbf\u53ef\u5237\u65b0\u6d4f\u89c8\u5668\u9875\u9762\uff0c\u8fd9\u5c06\u81ea\u52a8\u8df3\u8f6c\u5230Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u7684\u5b89\u88c5\u754c\u9762\uff0c\u6b64\u5904\u9700\u5355\u51fb\u201c\u6211\u540c\u610f\u201d\u6309\u94ae\uff0c\u8fdb\u5165\u4e0b\u4e00\u6b65\u7684\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5982\u56fe20-4\u6240\u793a\u3002<\/p>\n

\"\u7b2c1\u6b65\uff1a\u63a5\u53d7\u8bb8\u53ef\u534f\u8bae\"<\/p>\n

\u56fe20-4\u00a0 \u63a5\u53d7Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u7684\u5b89\u88c5\u8bb8\u53ef<\/p>\n

\u7b2c2\u6b65<\/strong>\uff1a\u68c0\u67e5Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u7684\u5b89\u88c5\u73af\u5883\u53ca\u76ee\u5f55\u6743\u9650\u3002\u6211\u4eec\u90e8\u7f72\u7684LNMP\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u7248\u672c\u548c\u8f6f\u4ef6\u90fd\u4e0eDiscuz!\u8bba\u575b\u7684\u8981\u6c42\u76f8\u7b26\u5408\uff0c\u5982\u679c\u56fe20-5\u6846\u4e2d\u7684\u76ee\u5f55\u72b6\u6001\u4e3a\u4e0d\u53ef\u5199\uff0c\u8bf7\u81ea\u884c\u68c0\u67e5\u76ee\u5f55\u7684\u6240\u6709\u8005\u548c\u6240\u5c5e\u7ec4\u662f\u5426\u4e3awww\u7528\u6237\uff0c\u4ee5\u53ca\u662f\u5426\u5bf9\u76ee\u5f55\u8bbe\u7f6e\u4e86755\u6743\u9650\uff0c\u7136\u540e\u5355\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u6309\u94ae\u3002<\/p>\n

\"\u7b2c2\u6b65\uff1a\u68c0\u67e5\u90e8\u7f72\u73af\u5883\"<\/p>\n

\u56fe20-5\u00a0 \u68c0\u67e5Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u7684\u5b89\u88c5\u73af\u5883\u53ca\u76ee\u5f55\u6743\u9650<\/p>\n

\u7b2c3\u6b65<\/strong>\uff1a\u9009\u62e9\u201c\u5168\u65b0\u5b89\u88c5Discuz! X\uff08\u542bUCenter Server\uff09\u201d\u3002UCenter Server\u662f\u7ad9\u70b9\u7684\u7ba1\u7406\u5e73\u53f0\uff0c\u80fd\u591f\u5728\u591a\u4e2a\u7ad9\u70b9\u4e4b\u95f4\u540c\u6b65\u4f1a\u5458\u8d26\u6237\u53ca\u5bc6\u7801\u4fe1\u606f\uff0c\u5355\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u6309\u94ae\uff0c\u5982\u56fe20-6\u6240\u793a\u3002<\/p>\n

\"\u7b2c3\u6b65\uff1a\u9009\u62e9\u5168\u65b0\u5b89\u88c5discuz!X\u8bba\u575b\"<\/p>\n

\u56fe20-6\u00a0 \u9009\u62e9\u5168\u65b0\u5b89\u88c5Discuz!\u8bba\u575b\u53caUCenter Server<\/p>\n

\u7b2c4\u6b65<\/strong>\uff1a\u586b\u5199\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u4fe1\u606f\u4e0e\u8bba\u575b\u7cfb\u7edf\u7ba1\u7406\u5458\u4fe1\u606f\u3002\u7f51\u7ad9\u7cfb\u7edf\u4f7f\u7528\u7531\u670d\u52a1\u5668\u672c\u5730\uff08localhost\uff09\u63d0\u4f9b\u7684\u6570\u636e\u5e93\u670d\u52a1\uff0c\u6570\u636e\u540d\u79f0\u4e0e\u6570\u636e\u8868\u524d\u7f00\u53ef\u7531\u7528\u6237\u81ea\u884c\u586b\u5199\uff0c\u5176\u4e2d\u6570\u636e\u5e93\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u5219\u4e3a\u7528\u4e8e\u767b\u5f55MySQL\u6570\u636e\u5e93\u7684\u4fe1\u606f\uff08\u4ee5\u521d\u59cb\u5316MySQL\u670d\u52a1\u7a0b\u5e8f\u65f6\u586b\u5199\u7684\u4fe1\u606f\u4e3a\u51c6\uff09\u3002\u8bba\u575b\u7cfb\u7edf\u7684\u7ba1\u7406\u5458\u8d26\u6237\u4e3a\u4eca\u540e\u767b\u5f55\u3001\u7ba1\u7406Discuz!\u8bba\u575b\u65f6\u4f7f\u7528\u7684\u9a8c\u8bc1\u4fe1\u606f\uff0c\u5176\u4e2d\u8d26\u6237\u53ef\u4ee5\u8bbe\u7f6e\u5f97\u7b80\u5355\u597d\u8bb0\u4e00\u4e9b\uff0c\u4f46\u662f\u8981\u5c06\u5bc6\u7801\u8bbe\u7f6e\u5f97\u5c3d\u53ef\u80fd\u590d\u6742\u4e00\u4e0b\u3002\u5728\u4fe1\u606f\u586b\u5199\u6b63\u786e\u540e\u5355\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u6309\u94ae\uff0c\u5982\u56fe20-7\u6240\u793a\u3002<\/p>\n

\"\u7b2c4\u6b65\uff1a\u586b\u5199\u6570\u636e\u5e93\u4e0e\u8bba\u575b\u7ba1\u7406\u5458\u4fe1\u606f\"<\/p>\n

\u56fe20-7\u00a0 \u586b\u5199\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u4fe1\u606f\u4e0e\u8bba\u575b\u7cfb\u7edf\u7ba1\u7406\u5458\u4fe1\u606f<\/p>\n

\u7b2c5\u6b65<\/strong>\uff1a\u7b49\u5f85Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u5b89\u88c5\u5b8c\u6bd5\uff0c\u5982\u56fe20-8\u6240\u793a\u3002\u8fd9\u4e2a\u5b89\u88c5\u8fc7\u7a0b\u662f\u975e\u5e38\u5feb\u901f\u7684\uff0c\u5927\u6982\u53ea\u9700\u898130\u79d2\u5de6\u53f3\uff0c\u7136\u540e\u5c31\u53ef\u770b\u5230\u8bba\u575b\u5b89\u88c5\u5b8c\u6210\u7684\u6b22\u8fce\u754c\u9762\u4e86\u3002\u7531\u4e8e\u865a\u62df\u673a\u4e3b\u673a\u53ef\u80fd\u5e76\u6ca1\u6709\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u56e0\u6b64\u8be5\u754c\u9762\u4e2d\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u663e\u793aDiscuz!\u8bba\u575b\u7cfb\u7edf\u7684\u5e7f\u544a\u4fe1\u606f\u3002\u5728\u63a5\u5165\u4e86\u4e92\u8054\u7f51\u7684\u670d\u52a1\u5668\u4e0a\u6210\u529f\u5b89\u88c5\u5b8cDiscuz! X3.2\u8bba\u575b\u7cfb\u7edf\u4e4b\u540e\uff0c\u5176\u754c\u9762\u5982\u56fe20-9\u6240\u793a\u3002\u968f\u540e\u5355\u51fb\u201c\u60a8\u7684\u8bba\u575b\u5df2\u5b8c\u6210\u5b89\u88c5\uff0c\u70b9\u6b64\u8bbf\u95ee\u201d\u6309\u94ae\uff0c\u5373\u53ef\u8bbf\u95ee\u5230\u8bba\u575b\u9996\u9875\uff0c\u5982\u56fe20-10\u6240\u793a\u3002<\/p>\n

\"\u7b2c5\u6b65\uff1a\u7b49\u5f85\u5b89\u88c5\u5b8c\u6bd5\"<\/p>\n

\u56fe20-8 \u00a0\u7b49\u5f85Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u5b89\u88c5\u5b8c\u6bd5<\/p>\n

\"\u7b2c6\u6b65\uff1adiscuz\u8bba\u575b\u987a\u5229\u5b89\u88c5\u5b8c\u6bd5\"<\/p>\n

\u56fe20-9\u00a0 \u6210\u529f\u5b89\u88c5Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u540e\u7684\u6b22\u8fce\u754c\u9762<\/p>\n

\"\u7b2c7\u6b65\uff1a\u8bbf\u95ee\u8bba\u575b\u4e3b\u9875\u9762\"<\/p>\n

\u56fe20-10 \u00a0Discuz! X3.2\u8bba\u575b\u7cfb\u7edf\u7684\u9996\u9875\u754c\u9762<\/p>\n

20.4 \u9009\u8d2d\u670d\u52a1\u5668\u4e3b\u673a<\/strong><\/span><\/h5>\n

\u6211\u4eec\u65e5\u5e38\u8bbf\u95ee\u7684\u7f51\u7ad9\u662f\u7531\u57df\u540d\u3001\u7f51\u7ad9\u6e90\u7a0b\u5e8f\u548c\u4e3b\u673a\u5171\u540c\u7ec4\u6210\u7684\uff0c\u5176\u4e2d\uff0c\u4e3b\u673a\u5219\u662f\u7528\u4e8e\u5b58\u653e\u7f51\u9875\u6e90\u4ee3\u7801\u5e76\u80fd\u591f\u628a\u7f51\u9875\u5185\u5bb9\u5c55\u793a\u7ed9\u7528\u6237\u7684\u670d\u52a1\u5668\u3002\u5728\u672c\u4e66\u5373\u5c06\u7ed3\u675f\u4e4b\u9645\uff0c\u5218\u9044\u8001\u5e08\u518d\u5570\u55e6\u51e0\u53e5\u6709\u5173\u670d\u52a1\u5668\u4e3b\u673a\u7684\u77e5\u8bc6\u4ee5\u53ca\u9009\u8d2d\u6280\u5de7\uff0c\u8fd9\u4e9b\u6280\u5de7\u90fd\u662f\u5728\u8fd1\u51e0\u5e74\u505a\u7f51\u7ad9\u65f6\u603b\u7ed3\u51fa\u6765\u7684\uff0c\u5e0c\u671b\u80fd\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n

\u865a\u62df\u4e3b\u673a<\/strong>\uff1a\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e2d\u5212\u5206\u4e00\u5b9a\u7684\u78c1\u76d8\u7a7a\u95f4\u4f9b\u7528\u6237\u653e\u7f6e\u7f51\u7ad9\u4fe1\u606f\u3001\u5b58\u653e\u6570\u636e\u7b49\uff1b\u4ec5\u63d0\u4f9b\u57fa\u7840\u7684\u7f51\u7ad9\u8bbf\u95ee\u3001\u6570\u636e\u5b58\u653e\u4e0e\u4f20\u8f93\u529f\u80fd\uff1b\u80fd\u591f\u6781\u5927\u5730\u964d\u4f4e\u7528\u6237\u8d39\u7528\uff0c\u4e5f\u51e0\u4e4e\u4e0d\u9700\u8981\u7528\u6237\u6765\u7ef4\u62a4\u7f51\u7ad9\u4ee5\u5916\u7684\u670d\u52a1\uff1b\u9002\u5408\u5c0f\u578b\u7f51\u7ad9\u3002<\/p>\n

VPS\uff08Virtual Private Server\uff0c\u865a\u62df\u4e13\u7528\u670d\u52a1\u5668\uff09<\/strong>\uff1a\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e2d\u5229\u7528OpenVZ\u3001Xen\u6216KVM\u7b49\u865a\u62df\u5316\u6280\u672f\u6a21\u62df\u51fa\u591a\u53f0\u201c\u4e3b\u673a\u201d\uff08\u5373VPS\uff09\uff0c\u6bcf\u4e2a\u4e3b\u673a\u90fd\u6709\u72ec\u7acb\u7684IP\u5730\u5740\u3001\u64cd\u4f5c\u7cfb\u7edf\uff1b\u4e0d\u540cVPS\u4e4b\u95f4\u7684\u78c1\u76d8\u7a7a\u95f4\u3001\u5185\u5b58\u3001CPU\u3001\u8fdb\u7a0b\u4e0e\u7cfb\u7edf\u914d\u7f6e\u5b8c\u5168\u9694\u79bb\uff0c\u7528\u6237\u53ef\u81ea\u7531\u4f7f\u7528\u5206\u914d\u5230\u7684\u4e3b\u673a\u4e2d\u7684\u6240\u6709\u8d44\u6e90\uff0c\u4e3a\u6b64\u9700\u8981\u5177\u5907\u4e00\u5b9a\u7684\u7ef4\u62a4\u7cfb\u7edf\u7684\u80fd\u529b\uff1b\u9002\u5408\u5c0f\u578b\u7f51\u7ad9\u3002<\/p>\n

ECS\uff08Elastic Compute Service\uff0c\u4e91\u670d\u52a1\u5668\uff09<\/strong>\uff1a\u662f\u4e00\u79cd\u6574\u5408\u4e86\u8ba1\u7b97\u3001\u5b58\u50a8\u3001\u7f51\u7edc\uff0c\u80fd\u591f\u505a\u5230\u5f39\u6027\u4f38\u7f29\u7684\u8ba1\u7b97\u670d\u52a1\uff1b\u4f7f\u7528\u8d77\u6765\u4e0eVPS\u51e0\u4e4e\u4e00\u6837\uff0c\u5dee\u522b\u662f\u4e91\u670d\u52a1\u5668\u662f\u5efa\u7acb\u5728\u4e00\u7ec4\u96c6\u7fa4\u670d\u52a1\u5668\u4e2d\uff0c\u6bcf\u4e2a\u670d\u52a1\u5668\u90fd\u4f1a\u4fdd\u5b58\u4e00\u4e2a\u4e3b\u673a\u7684\u955c\u50cf\uff08\u5907\u4efd\uff09\uff0c\u4ece\u800c\u5927\u5927\u63d0\u5347\u4e86\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\uff1b\u53e6\u5916\u8fd8\u5177\u5907\u7075\u6d3b\u6027\u4e0e\u6269\u5c55\u6027\uff1b\u7528\u6237\u53ea\u9700\u6309\u4f7f\u7528\u91cf\u4ed8\u8d39\u5373\u53ef\uff1b\u9002\u5408\u5927\u4e2d\u5c0f\u578b\u7f51\u7ad9\u3002<\/p>\n

\u72ec\u7acb\u670d\u52a1\u5668<\/strong>\uff1a\u8fd9\u53f0\u670d\u52a1\u5668\u4ec5\u63d0\u4f9b\u7ed9\u7528\u6237\u4e00\u4e2a\u4eba\u4f7f\u7528\uff0c\u5176\u4f7f\u7528\u65b9\u5f0f\u5206\u4e3a\u79df\u7528\u65b9\u5f0f\u4e0e\u6258\u7ba1\u65b9\u5f0f\u3002\u79df\u7528\u65b9\u5f0f\u662f\u7528\u6237\u5c06\u670d\u52a1\u5668\u7684\u786c\u4ef6\u914d\u7f6e\u8981\u6c42\u544a\u77e5IDC\u670d\u52a1\u5546\uff0c\u6309\u7167\u6708\u3001\u5b63\u3001\u5e74\u4e3a\u5355\u4f4d\u6765\u79df\u7528\u5b83\u4eec\u7684\u786c\u4ef6\u8bbe\u5907\u3002\u8fd9\u4e9b\u786c\u4ef6\u8bbe\u5907\u7531IDC\u670d\u52a1\u5546\u7684\u673a\u623f\u8d1f\u8d23\u7ef4\u62a4\uff0c\u7528\u6237\u4e00\u822c\u9700\u8981\u81ea\u884c\u5b89\u88c5\u76f8\u5e94\u7684\u8f6f\u4ef6\u5e76\u90e8\u7f72\u7f51\u7ad9\u670d\u52a1\uff0c\u8fd9\u51cf\u8f7b\u4e86\u7528\u6237\u5728\u786c\u4ef6\u8bbe\u5907\u4e0a\u7684\u6295\u5165\uff0c\u9002\u5408\u5927\u4e2d\u578b\u7f51\u7ad9\u3002\u6258\u7ba1\u65b9\u5f0f\u5219\u662f\u7528\u6237\u9700\u8981\u81ea\u884c\u8d2d\u7f6e\u670d\u52a1\u5668\u786c\u4ef6\u8bbe\u5907\uff0c\u5e76\u5c06\u5176\u4ea4\u7ed9IDC\u670d\u52a1\u4f9b\u5e94\u5546\u8fdb\u884c\u7ba1\u7406\uff08\u9700\u8981\u7f34\u7eb3\u7ba1\u7406\u670d\u52a1\u8d39\uff09\u3002\u7528\u6237\u5bf9\u670d\u52a1\u5668\u786c\u4ef6\u914d\u7f6e\u6709\u5b8c\u5168\u7684\u63a7\u5236\u6743\uff0c\u81ea\u4e3b\u6027\u5f3a\uff0c\u4f46\u9700\u8981\u81ea\u884c\u7ef4\u62a4\u3001\u4fee\u7406\u670d\u52a1\u5668\u786c\u4ef6\u8bbe\u5907\uff0c\u9002\u5408\u5927\u4e2d\u578b\u7f51\u7ad9\u3002<\/p>\n

\u53e6\u5916\u9700\u8981\u63d0\u9192\u8bfb\u8005\u7684\u662f\uff0c\u5728\u9009\u62e9\u670d\u52a1\u5668\u4e3b\u673a\u4f9b\u5e94\u5546\u65f6\u8bf7\u4e00\u5b9a\u8981\u6ce8\u610f\u67e5\u770b\u53e3\u7891\uff0c\u5e76\u5728\u7efc\u5408\u5206\u6790\u540e\u518d\u51b3\u5b9a\u8d2d\u4e70\u3002\u67d0\u4e9b\u4f9b\u5e94\u5546\u4f1a\u6709\u9650\u5236\u529f\u80fd\u3001\u5f3a\u5236\u6dfb\u52a0\u5e7f\u544a\u3001\u9690\u85cf\u6263\u8d39\u6216\u5f3a\u5236\u6263\u8d39\u7b49\u6076\u52a3\u884c\u4e3a\uff0c\u8bf7\u5404\u4f4d\u8bfb\u8005\u4e00\u5b9a\u64e6\u4eae\u773c\u775b\uff0c\u4e0d\u8981\u4e0a\u5f53!<\/p>\n

\u51fa\u73b0\u95ee\u9898?\u5927\u80c6\u63d0\u95ee!<\/strong><\/span><\/p>\n

\u56e0\u8bfb\u8005\u4eec\u786c\u4ef6\u4e0d\u540c\u6216\u64cd\u4f5c\u9519\u8bef\u90fd\u53ef\u80fd\u5bfc\u81f4\u5b9e\u9a8c\u914d\u7f6e\u51fa\u9519\uff0c\u8bf7\u8010\u5fc3\u518d\u4ed4\u7ec6\u770b\u770b\u64cd\u4f5c\u6b65\u9aa4\u5427\uff0c\u4e0d\u8981\u6c14\u9981~<\/p>\n

Linux\u6280\u672f\u4ea4\u6d41\u8bf7\u52a0A\u7fa4\uff1a560843(\u6ee1<\/span><\/strong>)\uff0cB\u7fa4\uff1a340829(\u63a8\u8350<\/span><\/strong>)\uff0cC\u7fa4\uff1a463590\uff08\u63a8\u8350<\/span><\/strong>\uff09\uff0c\u70b9\u6b64\u67e5\u770b\u5168\u56fd\u7fa4<\/a>\u3002<\/p>\n

*\u672c\u7fa4\u7279\u8272\uff1a\u901a\u8fc7\u53e3\u4ee4\u9a8c\u8bc1\u786e\u4fdd\u6bcf\u4e00\u4e2a\u7fa4\u5458\u90fd\u662f\u300aLinux\u5c31\u8be5\u8fd9\u4e48\u5b66\u300b\u7684\u8bfb\u8005\uff0c\u7b54\u7591\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u4e0d\u5b9a\u671f\u514d\u8d39\u9886\u53d6\u5b9a\u5236\u793c\u54c1\u3002<\/p><\/blockquote>\n

\u672c\u7ae0\u8282\u7684\u590d\u4e60\u4f5c\u4e1a(\u7b54\u6848\u5c31\u5728\u95ee\u9898\u7684\u4e0b\u4e00\u884c\u54e6\uff0c\u7528\u9f20\u6807\u9009\u4e2d\u5373\u53ef\u770b\u5230\u7684~)<\/span><\/strong><\/span><\/p>\n

1\uff0e\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u6700\u5927\u4f18\u70b9\u548c\u7f3a\u70b9\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u4f7f\u7528\u6e90\u7801\u5305\u5b89\u88c5\u670d\u52a1\u7a0b\u5e8f\u7684\u6700\u5927\u4f18\u52bf\u662f\uff0c\u670d\u52a1\u7a0b\u5e8f\u7684\u53ef\u79fb\u690d\u6027\u597d\uff0c\u800c\u4e14\u80fd\u66f4\u597d\u5730\u63d0\u5347\u670d\u52a1\u7a0b\u5e8f\u7684\u8fd0\u884c\u6548\u7387\uff1b\u7f3a\u70b9\u662f\u6e90\u7801\u5305\u7a0b\u5e8f\u7684\u5b89\u88c5\u3001\u7ba1\u7406\u3001\u5378\u8f7d\u548c\u7ef4\u62a4\u90fd\u6bd4\u8f83\u9ebb\u70e6\u3002<\/span><\/p>\n

2\uff0e\u4f7f\u7528\u6e90\u7801\u5305\u7684\u65b9\u5f0f\u6765\u5b89\u88c5\u8f6f\u4ef6\u670d\u52a1\u7684\u5927\u81f4\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u57fa\u672c\u5206\u4e3a4\u4e2a\u6b65\u9aa4\uff0c\u5206\u522b\u4e3a\u4e0b\u8f7d\u53ca\u89e3\u538b\u6e90\u7801\u5305\u6587\u4ef6\u3001\u7f16\u8bd1\u6e90\u7801\u5305\u4ee3\u7801\u3001\u751f\u6210\u4e8c\u8fdb\u5236\u5b89\u88c5\u7a0b\u5e8f\u3001\u8fd0\u884c\u4e8c\u8fdb\u5236\u7684\u670d\u52a1\u7a0b\u5e8f\u5b89\u88c5\u5305\u3002<\/span><\/p>\n

3\uff0eLNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u901a\u5e38\u5305\u542b\u4e86\u54ea\u4e9b\u670d\u52a1\u7a0b\u5e8f\uff1f<\/p>\n

\u7b54\uff1a<\/strong>LNMP\u52a8\u6001\u7f51\u7ad9\u90e8\u7f72\u67b6\u6784\u901a\u5e38\u5305\u542bLinux\u7cfb\u7edf\u3001Nginx\u7f51\u7ad9\u670d\u52a1\u3001MySQL\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff0c\u4ee5\u53caPHP\u811a\u672c\u8bed\u8a00\u3002<\/span><\/p>\n

4\uff0e\u5728MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u4e2d\uff0c\/usr\/local\/mysql\u4e0e\/usr\/local\/mysql\/var\u76ee\u5f55\u7684\u4f5c\u7528\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\/usr\/local\/mysql\u7528\u4e8e\u4fdd\u5b58MySQL\u6570\u636e\u5e93\u670d\u52a1\u7a0b\u5e8f\u7684\u76ee\u5f55\uff0c\/usr\/local\/mysql\/var\u5219\u7528\u4e8e\u4fdd\u5b58\u771f\u5b9e\u6570\u636e\u5e93\u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/span><\/p>\n

5\uff0e\u8f83\u4e4b\u4e8eApache\u670d\u52a1\u7a0b\u5e8f\uff0cNginx\u6700\u663e\u8457\u7684\u4f18\u52bf\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>Nginx\u670d\u52a1\u7a0b\u5e8f\u6bd4\u8f83\u7a33\u5b9a\uff0c\u539f\u56e0\u662f\u91c7\u7528\u4e86\u7684\u8d44\u6e90\u5206\u914d\u6280\u672f\uff0c\u964d\u4f4e\u4e86CPU\u4e0e\u5185\u5b58\u7684\u5360\u7528\u7387\uff0c\u6240\u4ee5\u4f7f\u7528Nginx\u7a0b\u5e8f\u90e8\u7f72\u7684\u52a8\u6001\u7f51\u7ad9\u73af\u5883\u4e0d\u4ec5\u5341\u5206\u7a33\u5b9a\u3001\u9ad8\u6548\uff0c\u800c\u4e14\u6d88\u8017\u7684\u7cfb\u7edf\u8d44\u6e90\u4e5f\u5f88\u5c11\u3002<\/span><\/p>\n

6\uff0e\u5982\u4f55\u7981\u6b62php\u670d\u52a1\u7a0b\u5e8f\u4e2d\u4e0d\u5b89\u5168\u7684\u529f\u80fd\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u7f16\u8f91php\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\uff08\/usr\/local\/php\/etc\/php.ini\uff09\uff0c\u628a\u8981\u7981\u7528\u7684\u529f\u80fd\u8ffd\u52a0\u5230disable_functions\u53c2\u6570\u4e4b\u540e\u5373\u53ef\u3002<\/span><\/p>\n

7\uff0e\u00a0\u5bf9\u4e8e\u5904\u4e8e\u521b\u4e1a\u9636\u6bb5\u7684\u5c0f\u7ad9\u957f\u7fa4\u4f53\u6765\u8bf4\uff0c\u9002\u5408\u8d2d\u4e70\u54ea\u79cd\u670d\u52a1\u5668\u7c7b\u578b\u5462\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u5218\u9044\u8001\u5e08\u5efa\u8bae\u4ed6\u4eec\u9009\u62e9\u4e91\u670d\u52a1\u5668\u7c7b\u578b\uff0c\u4e0d\u4f46\u8d39\u7528\u4fbf\u5b9c\uff08\u6bcf\u4e2a\u6708\u8d39\u7528\u4e0d\u8d85\u8fc7100\u5143\u4eba\u6c11\u5e01\uff09\uff0c\u800c\u4e14\u6027\u80fd\u4e5f\u5341\u5206\u5f3a\u52b2\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ea2\u5e3d\u67b6\u6784\u5e08\u4e3a\u60a8\u4eceLinux\u7cfb\u7edf\u7684\u8f6f\u4ef6\u5b89\u88c5\u65b9\u5f0f\u8bb2\u8d77\uff0c\u5e26\u9886\u8bfb\u8005\u5206\u8fa8RPM\u8f6f\u4ef6\u5305\u4e0e\u6e90\u7801\u5b89\u88c5\u7684\u533a\u522b\u3001\u5e76\u80fd\u591f\u7406\u89e3\u5b83\u4eec\u7684\u4f18\u7f3a\u70b9\u3002\u901a\u8fc7\u90e8\u7f72Linux+Nginx+MYSQL+PHP\u8fd9\u56db\u79cd\u5f00\u6e90\u8f6f\u4ef6\uff0c\u4fbf\u62e5\u6709\u4e86\u4e00\u4e2a\u514d\u8d39\u3001\u9ad8\u6548\u3001\u6269\u5c55\u6027\u5f3a\u3001\u8d44\u6e90\u6d88\u8017\u4f4e\u7684LNMP\u52a8\u6001\u7f51\u7ad9\u67b6\u6784\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":12608,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[558],"tags":[],"class_list":["post-2873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rhel7"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/2873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=2873"}],"version-history":[{"count":133,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/2873\/revisions"}],"predecessor-version":[{"id":218028,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/2873\/revisions\/218028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/12608"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=2873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=2873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=2873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}