{"id":30,"date":"2014-10-31T14:37:29","date_gmt":"2014-10-31T06:37:29","guid":{"rendered":"http:\/\/blog.haostudio.net\/hwp\/?p=30"},"modified":"2017-07-25T00:24:35","modified_gmt":"2017-07-24T16:24:35","slug":"%e5%9c%a8debian-%e4%b8%ad%e5%ae%89%e8%a3%9dwordpress","status":"publish","type":"post","link":"https:\/\/blog.haostudio.net\/hwp\/%e5%9c%a8debian-%e4%b8%ad%e5%ae%89%e8%a3%9dwordpress\/","title":{"rendered":"\u5728Debian \u4e2d\u5b89\u88ddWordPress"},"content":{"rendered":"<!--more-->\n<h2>\u5728Debian \u4e2d\u5b89\u88ddWordpress<\/h2>\n<h1>\u5b89\u88ddLAMP<\/h1>\n<p>\u53c3\u8003\u4e4b\u524d\u7684<a href=\"https:\/\/blog.haostudio.net\/hwp\/%E5%9C%A8cubieboard-%E4%B8%8A%E5%AE%89%E8%A3%9Dlamp-server\">LAMP \u5b89\u88dd\u6d41\u7a0b<\/a>, \u4e26\u5b89\u88ddphpmyadmin<\/p>\n<p>\u518d\u5b89\u88dd\u4e00\u4e9b\u984d\u5916\u5957\u4ef6, \u6709\u4e9b\u5916\u639b\u6703\u4f7f\u7528\u5230.<\/p>\n<pre><code># apt-get install curl libcurl3 php5-curl\n<\/code><\/pre>\n<h1>\u5efa\u7acb\u4e00\u500b\u7a7a\u767d\u7684MySql\u8cc7\u6599\u5eab, \u4ee5\u53ca\u4e00\u500b\u53ef\u4ee5\u5b58\u53d6\u6b64\u8cc7\u6599\u5eab\u7684\u7684user<\/h1>\n<p>\u4f7f\u7528Browser \u9023\u4e0aphpmyadmin, \u7528Mysql root\u7684\u5e33\u5bc6\u767b\u5165<\/p>\n<p>\u9996\u5148\u5efa\u7acb\u4e00\u500b\u8cc7\u6599\u5eab, \u8f38\u5165\u8cc7\u6599\u5eab\u540d\u7a31, \u4e26\u6307\u5b9a\u5176\u7de8\u78bc\u65b9\u5f0f, \u5982\u5716:<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_1x.png\" width=\"476\" \/>\n<p>\u63a5\u4e0b\u4f86\u65b0\u589e\u4e00\u500b\u4f7f\u7528\u8005\u7d66wordpress \u5c08\u7528<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_2x.png\" width=\"476\" \/>\n<p>\u8f38\u5165\u9019\u500b\u65b0\u4f7f\u7528\u8005\u7684\u5e33\u865f, \u5bc6\u78bc<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_3x.png\" width=\"476\" \/>\n<p>\u63a5\u4e0b\u4f86\u4fee\u6539\u9019\u500b\u4f7f\u7528\u8005\u7684\u6b0a\u9650<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_4x.png\" width=\"476\" \/>\n<p>\u6307\u5b9a\u525b\u525b\u65b0\u589e\u7684\u8cc7\u6599\u5eab\u540d\u7a31<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_5x.png\" width=\"476\" \/>\n<p>\u7136\u5f8c\u5c07\u6240\u6709\u7684\u6b0a\u9650\u90fd\u6253\u958b<\/p>\n<img decoding=\"async\" src=\"https:\/\/blog.haostudio.net\/hwp\/wp-content\/uploads\/2014\/10\/phpmyadmin_6x.png\" width=\"476\" \/>\n<p>ok, MySql\u7684\u8cc7\u6599\u5eab\u53ca\u4f7f\u7528\u8005\u5df2\u7d93\u5efa\u7acb\u5b8c\u6210.<\/p>\n<h1>\u5b89\u88ddwordpress<\/h1>\n<p>\u5230<a href=\"https:\/\/tw.wordpress.org\"><a href=\"https:\/\/tw.wordpress.org\">https:\/\/tw.wordpress.org<\/a><\/a>\u4e0b\u8f09\u6700\u65b0\u7684wordpress \u7248\u672c, \u5728\u4f60\u7684web server \u7684html\u76ee\u9304\u4e0b\u5efa\u7acb\u4e00\u500bwp\u76ee\u9304, \u4e26\u5c07wordpress \u89e3\u58d3\u5230\u6b64\u76ee\u9304\u4e2d.<\/p>\n<p>\u8acb\u6ce8\u610fapache \u7684user (\u5728Debian\u4e2d\u901a\u5e38\u70bawww-data) \u53ef\u4ee5\u8b80\u5beb\u6b64\u76ee\u9304.<\/p>\n<pre><code>chown -R www-data wp\nchgrp -R www-data wp\n<\/code><\/pre>\n<p>\u4f7f\u7528Browser \u9023\u7dda\u5230\u4f60\u7684server<\/p>\n<pre><code>http:\/\/your_srv_ip\/wp\n<\/code><\/pre>\n<p>\u7136\u5f8c\u4f9d\u7167\u6307\u793a\u64cd\u4f5c\u4e26\u8f38\u5165MySql \u7684\u8cc7\u6599\u5eab\u540d\u7a31\u5373\u4f7f\u7528\u8005\u5e33\u865f\u5373\u53ef.<\/p>\n<h1>\u52a0\u5f37wordpress \u5b89\u5168\u9632\u8b77<\/h1>\n<p>\u7576\u4f60\u7684wordpress \u5b89\u88dd\u5b8c\u6210\u5f8c, \u5c07wordpress \u4e2d\u7684wp-config.php \u6a94\u6848\u7684\u6b0a\u9650\u6539\u70ba400, \u56e0\u70ba\u6b64\u6a94\u6848\u542b\u6709\u4f60\u7684MySql \u7684\u5e33\u865f\u53ca\u5bc6\u78bc<\/p>\n<pre><code>chmod 400 wp-config.php\n<\/code><\/pre>\n<p>\u6216\u8005\u5229\u7528.htaccess \u4f86\u9650\u5236\u5916\u4f86\u7684\u5b58\u53d6<\/p>\n<pre><code>server# cd html\/wp                  ## \u5207\u5230wordpress \u76ee\u9304\nserver# cat .htpaccess\n\n&lt;files wp-config.php&gt;\norder allow,deny\ndeny from all\n&lt;\/files&gt;\n<\/code><\/pre>\n<p>\u5176\u4ed6\u76f8\u95dcwordpress \u5b89\u5168\u6027\u8a2d\u7f6e, \u8acb\u53c3\u95b1\u53c3\u8003\u8cc7\u6599[2], [3]<\/p>\n<p>\u6700\u597d\u662f\u4f7f\u7528.htaccess \u4f86\u4fdd\u8b77\u60a8\u7684\u8cc7\u6599, \u56e0\u70bawordpress  \u4e5f\u6703\u81ea\u5df1\u53bb\u4fee\u6539.htaccess \u7684\u5167\u5bb9\u4ee5\u52a0\u5f37\u4e00\u4e9b\u529f\u80fd.<\/p>\n<p><strong>\u6ce8\u610f<\/strong> .htaccess \u7684\u6b0a\u9650\u5fc5\u9808\u662fapache \u53ef\u4ee5\u8b80\u5beb\u7684\u6b0a\u9650. \u5efa\u8b70\u662f660, \u800c\u4e14owner \u53ca group \u90fd\u6539\u70bawww-data. (for Debian www user)<\/p>\n<hr \/>\n<h3>\u53c3\u8003\u8cc7\u6599<\/h3>\n<ol>\n<li><a href=\"http:\/\/codex.wordpress.org\/Installing_WordPress\">Installing WordPress<\/a><\/li>\n<li><a href=\"http:\/\/sofree.cc\/protect-your-wordpress\/\">\u5f37\u5316WordPress\u7db2\u7ad9\u5b89\u5168\u7684 12 \u500b\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"http:\/\/sofree.cc\/htaccess-bot\/\">\u5982\u4f55\u4f7f\u7528.htaccess\u64cb\u6389\u641c\u5c0b\u5f15\u64ce\u6a5f\u5668\u4eba<\/a><\/li>\n<li><a href=\"http:\/\/free.com.tw\/wordpress-htaccess-tips-and-tricks\/\">11 \u500b\u5f37\u5316 WordPress \u7db2\u7ad9\u5b89\u5168\u7684 .Htaccess \u8a2d\u5b9a\u6280\u5de7<\/a><\/li>\n<li><a href=\"http:\/\/www.pupuliao.info\/2011\/09\/wordpress%E5%9B%BA%E5%AE%9A%E7%B6%B2%E5%9D%80%E5%95%8F%E9%A1%8Curl%E9%87%8D%E5%AF%AB\/\">wordpress\u56fa\u5b9a\u7db2\u5740\u554f\u984c(URL\u91cd\u5beb)<\/a><\/li>\n<li><a href=\"http:\/\/jspnas.synology.me\/sky50302\/wordpress_permalink_404error\/\">WordPress \u56fa\u5b9a\u7db2\u5740 404\u932f\u8aa4<\/a><\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12],"tags":[14],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-linux","category-12","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":14,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/30\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}