<br />
<b>Warning</b>:  session_start(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/wwwroot/blog.gx86.cn:/www/wwwroot/blog.gx86.cn/:/www/server/fastcgi_cache/) in <b>/www/wwwroot/blog.gx86.cn/wp-content/plugins/chinese-captcha/chinese-captcha.php</b> on line <b>27</b><br />
<br />
<b>Warning</b>:  session_start(): Failed to initialize storage module: files (path: ) in <b>/www/wwwroot/blog.gx86.cn/wp-content/plugins/chinese-captcha/chinese-captcha.php</b> on line <b>27</b><br />
{"id":161,"date":"2018-01-21T02:46:11","date_gmt":"2018-01-20T18:46:11","guid":{"rendered":"http:\/\/blog.gx86.cn\/?p=161"},"modified":"2018-01-21T22:41:53","modified_gmt":"2018-01-21T14:41:53","slug":"f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44dae5f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44da9cf406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44d-2","status":"publish","type":"post","link":"https:\/\/blog.gx86.cn\/?p=161","title":{"rendered":"\u5728centOS\u4e0a\u642d\u5efawordpress\u535a\u5ba2\u7cfb\u7edf"},"content":{"rendered":"<p class=\"postTitle\">\u8f6c\u8f7d\u81ea\uff1a<a id=\"cb_post_title_url\" class=\"postTitle2\" href=\"http:\/\/www.cnblogs.com\/liyam\/p\/5195893.html\">\u5728centOS\u4e0a\u642d\u5efawordpress\u535a\u5ba2\u7cfb\u7edf<\/a><\/p>\n<p>\u8d2d\u4e70VPS\u540e\uff0c\u5f88\u591a\u4eba\u90fd\u4f1a\u9009\u62e9\u81ea\u5df1\u642d\u5efa\u4e00\u4e2a\u7f51\u7ad9\uff0c\u5176\u4e2d\u4f7f\u7528LAMP+wordpress\u53ef\u4ee5\u8bf4\u662f\u6700\u7b80\u5355\u7684\u5efa\u7ad9\u65b9\u6848\uff0c\u4e0b\u9762\u6211\u5c31\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4e00\u4e0b\u5177\u4f53\u7684\u5efa\u7ad9\u8fc7\u7a0b\u3002\u6211\u4f7f\u7528\u7684\u662f\u963f\u91cc\u4e91\u7684\u670d\u52a1\u5668\uff0c\u7cfb\u7edf\u662fcentOS6.5\uff0c\u4f7f\u7528xshell 5 \u8fdb\u884c\u8fdc\u7a0b\u63a7\u5236\u3002<\/p>\n<h3><strong>\u4e00\u3001\u4e3b\u8981\u5185\u5bb9<\/strong><\/h3>\n<p>1\u3001\u5b89\u88c5LAMP\u670d\u52a1\u5668\u7cfb\u7edf\uff08Linux\u3001Apache\u3001MySQL\u3001PHP \uff09;<\/p>\n<p>2\u3001\u5b89\u88c5wordpress\uff1b<\/p>\n<h3><strong>\u4e8c\u3001\u5177\u4f53\u6b65\u9aa4<\/strong><\/h3>\n<p>\u4e00\u3001LAMP\u73af\u5883\u8bbe\u7f6e<\/p>\n<p>1\u3001\u5b89\u88c5LAMP\u7cfb\u7edf\uff0c\u5728centOS\u4e0a\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4yum install\u8fdb\u884c\u5b89\u88c5\uff0c-y \u8868\u793a\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5168\u90e8\u9009\u62e9yes<\/p>\n<div class=\"cnblogs_code\">\n<pre>1 shell\u547d\u4ee4\uff1ayum -y install httpd mysql mysql-server php php-mysql php-gd php-xml<\/pre>\n<\/div>\n<p>2\u3001\u8bbe\u7f6ehttpd\u3001mysqld\u4e3a\u5f00\u673a\u542f\u52a8\u670d\u52a1<!--more--><\/p>\n<div class=\"cnblogs_code\">\n<pre>1 shell\u547d\u4ee4:  chkconfig httpd on\r\n2 \u3000\u3000\u3000\u3000\u3000\u3000 chkconfig mysqld on<\/pre>\n<\/div>\n<p>3\u3001\u542f\u52a8\u670d\u52a1<\/p>\n<div class=\"cnblogs_code\">\n<pre>1 shell\u547d\u4ee4: service httpd start\r\n2 \u3000\u3000\u3000\u3000\u3000\u3000service mysqld start<\/pre>\n<\/div>\n<p>4\u3001MySQL\u6570\u636e\u5e93\u8bbe\u7f6e<\/p>\n<p>&#8212;-\u914d\u7f6emysql\uff1a\u00a0\u00a0<code>mysql_secure_installation<\/code><\/p>\n<div class=\"cnblogs_code\">\n<pre>1 \u4e3b\u8981\u5185\u5bb9\u5982\u4e0b \r\n2 Set root password? [Y\/n] \/\/\u8bbe\u7f6eroot\u5bc6\u7801\uff08<span style=\"color: #ff0000;\">\u5efa\u8bae\u9009N,\u9009Y,\u5c31\u8981\u8bbe\u7f6e\u5bc6\u7801\uff0c\u540e\u9762\u4e5f\u5f97\u8f93\u5165\u5bc6\u7801<\/span>\uff09\r\n3 anonymous users? [Y\/n] \/\/\u5220\u9664\u533f\u540d\u7528\u6237\uff08\u9009Y\uff09\r\n4 Disallow root login remotely? [Y\/n] \/\/\u7981\u6b62root\u7528\u6237\u8fdc\u7a0b\u767b\u5f55\uff08\u9009n\uff09\r\n5 Remove test database and access to it? [Y\/n] \/\/\u5220\u9664\u9ed8\u8ba4\u7684 test \u6570\u636e\u5e93\uff08\u9009Y\uff09  \r\n6 Reload privilege tables now? [Y\/n] \/\/\u662f\u5426\u9a6c\u4e0a\u5e94\u7528\u6700\u65b0\u7684\u8bbe\u7f6e\uff08\u9009Y\uff09<\/pre>\n<div class=\"cnblogs_code_toolbar\"><\/div>\n<\/div>\n<p>&#8212;-\u767b\u9646MySQL\u6570\u636e\u5e93\uff1a\u00a0 mysql\u00a0\u2013u root\u00a0\u2013p \u00a0 \uff08\u4e00\u5f00\u59cb\u5bc6\u7801\u4e3a\u7a7a\uff0c\u76f4\u63a5\u6309\u56de\u8f66\u952e\u5373\u53ef\uff0c\u5982\u679c\u524d\u9762\u8f93\u5165\u4e86\u5bc6\u7801\uff0c\u5219\u6b64\u65f6\u5e94\u8be5\u662f\u624b\u52a8\u8f93\u5165\u4e0a\u9762\u7684\u4ee3\u7801\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u8f93\u5165\u5bc6\u7801\uff09<\/p>\n<div class=\"cnblogs_code\">\n<pre>mysql&gt; create database wordpress \\g;   \/\/\u521b\u5efawordpress\u6570\u636e\u5e93\uff0c\u4e3a\u4e0b\u9762\u5b89\u88c5wordpress\u505a\u51c6\u3002\r\n            <span style=\"color: #ff0000;\">\/\/\u6ce8\uff1a\u6bd4\u539f\u6765\u4f5c\u8005\u591a\u52a0\u4e86 \\g \uff0c\u8fd9\u6837\u624d\u80fd\u771f\u6b63\u5efa\u7acb\u6570\u636e\uff0c\u5426\u5219\u4f1a\u63d0\u793a\u6570\u636e\u5e93\u8fde\u63a5\u51fa\u9519\u3002<\/span><\/pre>\n<\/div>\n<h3><strong>\u4e8c\u3001\u5b89\u88c5wordpress<\/strong><\/h3>\n<p>1\u3001\u4e0b\u8f7d\u5b89\u88c5<\/p>\n<div class=\"cnblogs_code\">\n<pre>1 wget https:\/\/cn.wordpress.org\/wordpress-4.9.1-zh_CN.zip   \/\/\u4e0b\u8f7d \r\n3 unzip wordpress-4.9.1-zh_CN.zip    \/\/\u89e3\u538b \r\n<span style=\"color: #ff0000;\">\/\/\u6ce8\uff1a\u5982\u679c\u89e3\u538b\u5931\u8d25\uff0c\u5219\u6267\u884c\u4e00\u53e5\uff1a yum install zip unzip<\/span> \uff0c\u6839\u636e\u63d0\u793ay\uff0c\u8fdb\u884czip\u8f6f\u4ef6\u5b89\u88c5\u3002\r\n5 cp -r wordpress\/* \/var\/www\/html\/   \/\/\u5c06wordpress\u4e0b\u6240\u6709\u7684\u6587\u4ef6\u590d\u5236\u5230apache\u670d\u52a1\u5668\u4e0b\u7684\u6839\u76ee\u5f55\r\n<span style=\"color: #ff0000;\">\/\/\u6ce8\uff1a\u5982\u679c\u8981\u5728html\u6587\u4ef6\u5939\u4e0b\u8bbe\u7f6e\u4e00\u4e2a\u72ec\u7acb\u4e86WordPress\u6587\u4ef6\u5939\uff0c\u5219\u5e94\u8be5\u662f<\/span>\r\n<span style=\"color: #ff0000;\">5 cp -r wordpress\/ \/var\/www\/html\/    \/\/\u5c06wordpress\u6587\u4ef6\u5939\u590d\u5236\u5230apache\u670d\u52a1\u5668\u4e0b\u7684\u6839\u76ee\u5f55\uff0c\r\n                                     \/\/\u7f51\u7ad9\u8bbf\u95ee\u8def\u5f84\u5219\u662fIP\/wordpress<\/span><\/pre>\n<\/div>\n<p>2\u3001\u914d\u7f6ewordpress\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<div class=\"cnblogs_code\">\n<pre>cd \/var\/www\/html\/wordpress\/   \/\/\u8fdb\u5165wordpress\u6587\u4ef6\u5939\u4e0b\r\ncp wp-config-sample.php wp-config.php  \/\/\u590d\u5236\u914d\u7f6e\u6587\u4ef6\r\nvim wp-config.php  \/\/\u7f16\u8f91wordpress\u7684\u914d\u7f6e\u6587\u4ef6<\/pre>\n<\/div>\n<p><code>\u7136\u540e\u8f93\u5165\u6570\u636e\u5e93\u540d\u79f0\uff0c\u4f8b\u5982\u6211\u4e0a\u9762\u521b\u5efa\u7684\u6570\u636e\u5e93wordpress\uff0c\u7136\u540e\u662f\u6570\u636e\u5e93\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u201cMySQL\u4e3b\u673a\u201d\u4e00\u822c\u9ed8\u8ba4\u4e3alocalhost\uff0c\u4e0d\u9700\u8981\u4fee\u6539<\/code><\/p>\n<p>\/\/ ** MySQL \u8bbe\u7f6e &#8211; \u5177\u4f53\u4fe1\u606f\u6765\u81ea\u60a8\u6b63\u5728\u4f7f\u7528\u7684\u4e3b\u673a ** \/\/<br \/>\n\/** WordPress\u6570\u636e\u5e93\u7684\u540d\u79f0 *\/<br \/>\ndefine(&#8216;DB_NAME&#8217;, &#8216;wordpress&#8217;);<\/p>\n<p>\/** MySQL\u6570\u636e\u5e93\u7528\u6237\u540d *\/<br \/>\ndefine(&#8216;DB_USER&#8217;, &#8216;root&#8217;);<\/p>\n<p>\/** MySQL\u6570\u636e\u5e93\u5bc6\u7801 *\/<br \/>\ndefine(&#8216;DB_PASSWORD&#8217;, &#8216;12345678&#8217;);\u00a0<span style=\"color: #ff0000;\"> \u00a0\/\/\u8f93\u5165\u4f60\u4e0a\u9762\u8bbe\u7f6e\u7684\u5bc6\u7801<\/span><\/p>\n<p>\/** MySQL\u4e3b\u673a *\/<br \/>\ndefine(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/682700\/201602\/682700-20160217171220128-53703929.png\" alt=\"\" width=\"627\" height=\"294\" \/><strong>\u4e09\u3001\u5b89\u88c5\u5b8c\u6210<\/strong><\/p>\n<p>\u6700\u540e\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165ip\u5730\u5740\uff08ip\\wordpress\uff09\uff0c\u7136\u540e\u6309\u7167\u63d0\u793a\uff0c\u5c31\u6210\u529f\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u81ea\u5df1\u7684\u535a\u5ba2\u7cfb\u7edf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\u81ea\uff1a\u5728centOS\u4e0a\u642d\u5efawordpress\u535a\u5ba2\u7cfb\u7edf \u8d2d\u4e70VPS\u540e\uff0c\u5f88\u591a\u4eba\u90fd\u4f1a\u9009\u62e9\u81ea\u5df1\u642d\u5efa\u4e00\u4e2a\u7f51\u7ad9\uff0c\u5176\u4e2d\u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[20,22,18,21,19,13],"class_list":["post-161","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos","tag-mysql","tag-wordpress","tag-f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44dae5f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44da8df406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44d","tag-f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44dae6f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44da90f406e51f38b5ed14ba75615cb22b246487bea3a6d8af92b2f5cd3df07cbd44d","tag-b501e03a44e77841d45f97df661eb3c4d02b6f7dc07b1450d29bdd7ab9a73419e6b501e03a44e77841d45f97df661eb3c4d02b6f7dc07b1450d29bdd7ab9a7341995b501e03a44e77841d45f97df661eb3c4d02b6f7dc07b1450d29bdd7ab9a7341"],"_links":{"self":[{"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/posts\/161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161"}],"version-history":[{"count":5,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":181,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions\/181"}],"wp:attachment":[{"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gx86.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}