{"id":7,"date":"2018-04-10T00:35:27","date_gmt":"2018-04-09T16:35:27","guid":{"rendered":"http:\/\/esufy.com\/?p=6"},"modified":"2024-03-17T20:30:37","modified_gmt":"2024-03-17T12:30:37","slug":"linux%e4%b8%8b%e5%88%a9%e7%94%a8wordpress%e6%90%ad%e5%bb%ba%e4%b8%aa%e4%ba%ba%e5%8d%9a%e5%ae%a2","status":"publish","type":"post","link":"http:\/\/www.esufy.cn\/?p=7","title":{"rendered":"Linux\u4e0b\u5229\u7528WordPress\u642d\u5efa\u4e2a\u4eba\u535a\u5ba2"},"content":{"rendered":"<p><strong>\u4e00\u3001\u5229\u7528apache<\/strong><br \/>\n1.\u5b89\u88c5\u76f8\u5173\u8f6f\u4ef6<br \/>\n\u5b89\u88c5apache\uff1ayum install httpd<br \/>\n\u5b89\u88c5php\uff1ayum install php php-mysql<br \/>\n\u5b89\u88c5MySQL\uff1ayum install -y mysql-server mysql mysql-devel<br \/>\n\u542f\u52a8 apache\uff1aapachectl start\uff0c\u4ee5\u540e\u9700\u8981\u91cd\u542f\u65f6\u5c31 apachectl restart<br \/>\n\u542f\u52a8MySQL\uff1aservice mysqld start<br \/>\n\u4fee\u6539root\u5bc6\u7801\uff1a\/usr\/bin\/mysqladmin -u root password &#8216;your password&#8217;<br \/>\n2.\u8fdb\u5165mysql\uff0c\u521b\u5efa\u6570\u636e\u5e93wordpress\u6240\u9700\u6570\u636e\u5e93<br \/>\n\u8fdb\u5165mysql:mysql -uroot -p<br \/>\n\u521b\u5efa\u6570\u636e\u5e93\uff08\u6570\u636e\u5e93\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff09\uff1acreate database wordpress;<br \/>\n\u9000\u51famysql\uff1aexit;<br \/>\n3.\u4e0b\u8f7dWordPress\uff1awget https:\/\/cn.wordpress.org\/wordpress-4.9-zh_CN.tar.gz<br \/>\n4.\u89e3\u538b\uff1atar xvf wordpress-4.9-zh_CN.tar.gz<br \/>\n5.\u5c06wordpress\u79fb\u52a8\u5230\/var\/www\u76ee\u5f55\u4e0b\uff0c\u5e76\u91cd\u547d\u4ee4\u4e3ahtml\uff1amv wordpress \/var\/www\/html<br \/>\n6.WordPress\u5177\u4f53\u5b89\u88c5\u8fc7\u7a0b<br \/>\n(1)\u5728\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u642d\u5efa\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u670d\u52a1\u5668\u7684IP\u5730\u5740\/wordpress\/index.php\uff0c\u5047\u5982\u6211\u7684\u5730\u5740\u662f138.68.21.245\uff0c\u5219\u5e94\u5728\u672c\u5730\u6d4f\u89c8\u5668\u4e2d\u5e94\u8f93\u5165120.79.5.208\/wordpress\/index.php\uff0c\u51fa\u73b0\u5982\u4e0b\u754c\u9762\uff1a<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-7\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/1.png\" alt=\"\" width=\"1441\" height=\"766\" \/><br \/>\n(2)\u70b9\u51fb\u63d0\u4ea4\u540e\uff0c\u4f1a\u51fa\u73b0\u5982\u4e0b\u754c\u9762:<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-8\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/2.png\" alt=\"\" width=\"1440\" height=\"773\" \/><br \/>\n(3)\u70b9\u73b0\u5728\u5b89\u88c5\u5373\u53ef\uff0c\u63a5\u7740\u4f1a\u51fa\u73b0\u4e0b\u9762\u7684\u754c\u9762\u3002\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u6839\u636e\u9700\u8981\u586b\u5199\u5373\u53ef\uff0c\u522b\u5fd8\u4e86\u7535\u5b50\u90ae\u4ef6\u3002\u8bbe\u7f6e\u5b8c\u6210\u540e\u70b9\u51fb\u5b89\u88c5WordPress\u5373\u53ef<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-9\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/3.png\" alt=\"\" width=\"1426\" height=\"753\" \/><br \/>\n(4)\u7136\u540e\u4f1a\u51fa\u73b0\u4e0b\u9762\u7684\u767b\u5f55\u754c\u9762\uff0c\u5c06\u4e0a\u4e00\u6b65\u4e2d\u4f60\u8bbe\u7f6e\u7684\u7528\u6237\u540d\u4e0e\u5bc6\u7801\u586b\u5165\uff0c\u70b9\u51fb\u767b\u5f55\u5373\u53ef<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-10\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/4.png\" alt=\"\" width=\"1424\" height=\"745\" \/><br \/>\n(5)\u4e0a\u8ff0\u6b65\u9aa4\u767b\u5f55\u5b8c\u6210\u540e\u5c31\u4f1a\u51fa\u5148\u4e0b\u9762\u754c\u9762\uff0c\u8fd9\u4e2a\u5c31\u662f\u9ed8\u8ba4\u7684WordPress\u540e\u53f0\uff0c\u53ef\u4ee5\u5728\u8fd9\u91cc\u8fdb\u884c\u76f8\u5173\u8bbe\u7f6e<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-11\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/5.png\" alt=\"\" width=\"1426\" height=\"765\" \/><br \/>\n(6)\u4e0b\u9762\u5c31\u662f\u9ed8\u8ba4\u7684\u7f51\u7ad9\u9996\u9875<br \/>\n<img loading=\"lazy\" class=\"alignnone size-full wp-image-12\" src=\"http:\/\/esufy.com\/wp-content\/uploads\/2018\/04\/6.png\" alt=\"\" width=\"1426\" height=\"767\" \/><br \/>\n<strong>\u4e8c\u3001\u5229\u7528nginx<\/strong><br \/>\n1.\u5b89\u88c5nginx<br \/>\n(1)\u5b89\u88c5C\u8bed\u8a00\u7f16\u8bd1\u73af\u5883\uff1ayum install gcc-c++<br \/>\n(2)\u5b89\u88c5pcre\u5e93\uff1ayum install pcre pcre-devel<br \/>\n(3)\u5b89\u88c5zlib\u5e93\uff1ayum install zlib zlib-devel<br \/>\n(4)\u5b89\u88c5openssl\uff1ayum install openssl openssl-devel<br \/>\n(5)\u4e0b\u8f7dnginx\uff1awget https:\/\/nginx.org\/download\/nginx-1.13.9.tar.gz<br \/>\n(5)\u68c0\u67e5\u4f9d\u8d56\uff1a.\/configure<br \/>\n(6)\u7f16\u8bd1\uff1amake<br \/>\n(7)\u5b89\u88c5\uff1amake install<br \/>\n(8)\u5b89\u88c5nginx\uff1ayum install nginx<br \/>\n2.\u5b89\u88c5mysql\uff1a\u53c2\u8003\u4e0a\u9762\u7684\u5b89\u88c5<br \/>\n3.\u5b89\u88c5php\uff1ayum install php php-mysql php-fpm\uff0c\u542f\u52a8\uff1aservice php-fpm start<br \/>\n4.\u914d\u7f6e nginx.conf\uff0c\u66f4\u6539\u7f51\u7ad9\u9ed8\u8ba4\u76ee\u5f55\uff0c\u4f7f\u5176\u652f\u6301\u89e3\u6790.php<br \/>\n(1)\u5982\u679c\u6ca1\u6709nginx.conf\uff0c\u590d\u5236\uff1acp \/etc\/nginx\/nginx.conf.default \/etc\/nginx\/nginx.conf<br \/>\n(2)\u4fee\u6539nginx.conf\uff1avi \/etc\/nginx\/nginx.conf<br \/>\n<code>server {<br \/>\nlisten 80;<br \/>\nserver_name 120.79.5.208;<br \/>\nroot \/var\/www\/html;<br \/>\nindex index.php index.html index.htm;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ \/index.php?$args;<br \/>\n}<br \/>\n# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br \/>\nlocation ~ \\.php$ {<br \/>\nfastcgi_pass 127.0.0.1:9000;<br \/>\nfastcgi_index index.php;<br \/>\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br \/>\ninclude fastcgi_params;<br \/>\n}<br \/>\n}<\/code><br \/>\n(3)\u542f\u52a8nginx\uff1aservice nginx start<br \/>\n5.\u4e0b\u8f7d\u5b89\u88c5WordPress\uff0c\u53c2\u8003\u4e0a\u9762\u7684\u4e0b\u8f7d\u5b89\u88c5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5229\u7528apache 1.\u5b89\u88c5\u76f8\u5173\u8f6f\u4ef6 \u5b89\u88c5apache\uff1ayum install httpd \u5b89\u88c5php\uff1ayu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":298,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[13,46],"_links":{"self":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/7"}],"collection":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":1,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":109,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions\/109"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/media\/298"}],"wp:attachment":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}