{"id":68,"date":"2016-11-20T16:24:33","date_gmt":"2016-11-20T08:24:33","guid":{"rendered":"https:\/\/myscis.cn\/?p=68"},"modified":"2016-11-20T16:24:33","modified_gmt":"2016-11-20T08:24:33","slug":"wordpress-lnmp","status":"publish","type":"post","link":"https:\/\/myscis.cn\/?p=68","title":{"rendered":"WordPress@LNMP"},"content":{"rendered":"<p>\u89e3\u51b3\u7f51\u7ad9\u76ee\u5f55\u6743\u9650\u95ee\u9898\uff0c\u66f4\u6539\u7f51\u7ad9\u76ee\u5f55\u6240\u6709\u8005\u4e3a\u666e\u901a\u7528\u6237ubuntu\n<\/p>\n<p>sudo chown -R ubuntu:ubuntu \/usr\/share\/nginx\/html\n<\/p>\n<p>sudo chmod -R 757 \/usr\/share\/nginx\/html\n<\/p>\n<p>\u8fd9\u6837\u6211\u4eec\u5c31\u53ef\u4ee5\u7528ubuntu\u7528\u6237\u5bf9\u7f51\u7ad9\u8fdb\u884c\u64cd\u4f5c\u4e86\u3002\n<\/p>\n<p>\u4e00\u3001\u4e0a\u4f20wordpress\u5b89\u88c5\u6587\u4ef6\n<\/p>\n<p>\u5e38\u89c1\u7684\u65b9\u6cd5\u6709\u4e24\u79cd\uff1a\n<\/p>\n<p>1.\u9996\u5148\u5f53\u7136\u662f\u4e0b\u8f7dwordpress\uff08\u4ee5\u4e0b\u7b80\u79f0wp\uff09\u5230\u672c\u5730\uff0c\u9ed8\u8ba4\u4e0b\u8f7d\u6700\u65b0\u7248\u672c<a href=\"https:\/\/wordpress.org\/latest.zip\">https:\/\/wordpress.org\/latest.zip<\/a>\u3002\u73b0\u5728\u6700\u65b0\u7248\u662fwordpress-4.6.1\u3002\n<\/p>\n<p>\u5728\u672c\u5730\u89e3\u538bwordpress-4.6.1.zip\u89e3\u538b\u5230\u4e00\u4e2a\u76ee\u5f55\uff0c\u6211\u8fd9\u91cc\u9009\u62e9\u684c\u9762\u3002\u63a5\u7740\u5229\u7528<a href=\"http:\/\/winscp.net\/\">WinScp<\/a>\u4e0a\u4f20wordpress\u6587\u4ef6\u5939\u5185\u6240\u6709\u6587\u4ef6\u5230\u7f51\u7ad9\u76ee\u5f55\/usr\/share\/nginx\/html\u3002\n<\/p>\n<p>\n\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN1.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN2.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN3.png\" alt=\"\"\/>\n\t<\/p>\n<p>\u6b64\u5904\u4e5f\u5c31\u5b8c\u6210\u4e86\u4e0a\u4f20\u4efb\u52a1\u3002\n<\/p>\n<p>2.\u7b2c\u4e8c\u79cd\u65b9\u6cd5\u4e0d\u7ecf\u8fc7\u672c\u5730\uff0c\u76f4\u63a5\u5728\u7ec8\u7aef\uff08\u6211\u9009\u7528\u7684\u662fputty\uff0c\u591a\u5570\u55e6\u53e5\u4e60\u60efwindows\u7684\u65b0\u624b\u63a8\u8350\u4f7f\u7528Winscp+putty\u7684\u7ec4\u5408\uff09\u4e0a\u64cd\u4f5c\u5373\u53ef\u3002\n<\/p>\n<p>cd \/usr\/share\/nginx\/html\/\n<\/p>\n<p>wget https:\/\/wordpress.org\/latest.zip -O wp.zip\n<\/p>\n<p>unzip wp\n<\/p>\n<p>mv \/usr\/share\/nginx\/html\/wordpress\/* \/usr\/share\/nginx\/html\/\n<\/p>\n<p>rm -f wp.zip|rm -rf wordpress\n<\/p>\n<p>\u4e8c\u3001\u6570\u636e\u5e93\u51c6\u5907\n<\/p>\n<p>\u6211\u4eec\u521b\u5efa\u4e00\u4e2awp\u7528\u7684MySQL \u6570\u636e\u5e93\u548cwp\u4e13\u7528\u6570\u636e\u5e93\u7528\u6237\u3002\n<\/p>\n<p>mysql -uroot \u2013p   #\u8f93\u5165\u4e4b\u524d\u8bbe\u7f6e\u7684MySQL  root\u5bc6\u7801\u8fdb\u5165MySQL\u547d\u4ee4\u884c\n<\/p>\n<p>create database mysciswp;\n<\/p>\n<p>grant all on mysciswp.* to &#8216;wpuser&#8217;@&#8217;localhost&#8217; identified by &#8216;wppassword&#8217;;  #\u521b\u5efa\u540d\u4e3awpuser\u5bc6\u7801wppassword\u7684\u6570\u636e\u5e93\u7528\u6237\uff0cwpuser\u5177\u6709\u7ba1\u7406mysciswp\u6570\u636e\u5e93\u7684\u6240\u6709\u6743\u9650\n<\/p>\n<p>flush privileges;  #\u5237\u65b0\u6743\u9650\n<\/p>\n<p>exit  #\u9000\u51faMySQL\u547d\u4ee4\u884c\n<\/p>\n<p>\u4e09\u3001\u5f00\u59cb\u5b89\u88c5Wordpress\n<\/p>\n<p>\u73b0\u5728\u767b\u9646\u6211\u4eec\u7684\u670d\u52a1\u5668IP\u6216\u8005\u7f51\u7ad9\u3002\u56e0\u4e3a\u6211\u4eec\u4e0b\u8f7d\u662f\u6700\u65b0\u7248\uff0c\u8fd9\u4e2a\u9ed8\u8ba4\u662f\u82f1\u8bed\u3002\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN4.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p>\u9009\u62e9  <span style=\"color:#222222; font-family:Consolas; font-size:9pt; background-color:white\">Let&#8217;s go!<br \/>\n<\/span><\/p>\n<p>\n\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN5.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p>\u586b\u5199\u5b8c\u6210\u540e\u63d0\u4ea4&#8221;Submit&#8221;\u3002\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN6.png\" alt=\"\"\/>\n\t<\/p>\n<p>\u5982\u679c\u51fa\u73b0\u8fd9\u4e2a\u63d0\u793a\uff0c\u5219\u8868\u793a\u65e0\u6cd5\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165\u4fe1\u606f\u662f\u5426\u6709\u8bef\u3002\u6216\u8005\u786e\u5b9e\u662f\u5426\u6709\/usr\/share\/nginx\/html\u76ee\u5f55\u7684\u5199\u6743\u9650\u3002\n<\/p>\n<p>\u6b63\u5e38\u7ed3\u679c\u662f\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN7.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p>\u63a5\u7740\u5c31\u662f\u8bbe\u7f6ewordpress\u7684\u4fe1\u606f\u4e86\n<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN8.png\" alt=\"\"\/>\n\t<\/p>\n<p>\n\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/myscis.cn\/wp-content\/uploads\/112016_0824_WordpressLN9.png\" alt=\"\"\/>\n\t<\/p>\n<p>\u81f3\u6b64\uff0cWordpress\u5c31\u5b89\u88c5\u5b8c\u6210\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u51b3\u7f51\u7ad9\u76ee\u5f55\u6743\u9650\u95ee\u9898\uff0c\u66f4\u6539\u7f51\u7ad9\u76ee\u5f55\u6240\u6709\u8005\u4e3a\u666e\u901a\u7528\u6237ubuntu sudo chown -R ubuntu:ub&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-mo-ren"],"_links":{"self":[{"href":"https:\/\/myscis.cn\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myscis.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myscis.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myscis.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myscis.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":0,"href":"https:\/\/myscis.cn\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"wp:attachment":[{"href":"https:\/\/myscis.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myscis.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myscis.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}