{"id":186,"date":"2011-08-19T11:44:54","date_gmt":"2011-08-19T03:44:54","guid":{"rendered":"http:\/\/www.hsyyf.me\/?p=186"},"modified":"2011-08-26T19:01:51","modified_gmt":"2011-08-26T11:01:51","slug":"arch%e6%9c%ac%e5%9c%b0%e5%ae%89%e8%a3%85lampwordpress%ef%bc%88%e4%b8%80%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.hsyyf.me\/?p=186","title":{"rendered":"Arch\u672c\u5730\u5b89\u88c5LAMP+wordpress\uff08\u4e00\uff09"},"content":{"rendered":"<p>\u95f2\u6765\u65e0\u4e8b\uff0c\u62ff\u7740Arch\u81ea\u5df1\u88c5\u4e86\u4e2aLAMP\uff0c\u4e0a\u7f51\u641c\u8d44\u6599\u53d1\u73b0Arch\u7684Wiki\u8fd8\u771f\u662f\u8be6\u7ec6\u5230\u5bb6\u4e86\uff0c\u8fd9\u90fd\u6709\uff0c\u800c\u4e14\u8fd8\u6709\u5e38\u89c1\u9519\u8bef\u7684\u5904\u7406\u3002\u539f\u6587\u5730\u5740 <a href=\"https:\/\/wiki.archlinux.org\/index.php\/LAMP_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29\" target=\"_blank\">https:\/\/wiki.archlinux.org\/index.php\/LAMP_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29<\/a><br \/>\n\u8fd9\u4efdWiki\u8fc7\u4e8e\u8be6\u7ec6\uff0c\u53c8\u8981\u4eba\u5934\u5927\u4e86\uff0c\u5728\u8fd9\u7565\u4e3a\u7b80\u5316\u4e00\u4e0b\uff0c\u7b97\u662f\u505a\u4e2a\u7b14\u8bb0\u3002<!--more--><br \/>\n\u9996\u5148\u5b89\u88c5LAMP\uff0cpacman -S apache php php-apache mysql\u3002\u8fd9\u4e2a\u6ca1\u4ec0\u4e48\u8bf4\u7684\uff0c\u4e0d\u8fc7Wiki\u4e0a\u8bf4\u53ef\u4ee5\u5355\u72ec\u5b89\u88c5\uff0c\u4e0d\u5fc5\u5168\u5b89\u88c5\uff0c\u53ef\u80fd\u662f\u9700\u6c42\u4e0d\u4e00\u6837\u5427\uff0c\u6211\u8fd9\u5168\u90e8\u5b89\u88c5\u4e86\u3002<\/p>\n<p>\u914d\u7f6eApache\u3002\u6dfb\u52a0\u4e00\u4e2ahttp\u7528\u6237\uff0cuseradd -d \/srv\/http -r -s \/bin\/false -U http\u3002\u81f3\u4e8eWiki\u4e2d\u4fee\u6539hostname\uff0c\u4e00\u822c\u4e0d\u7528\u4fee\u6539\uff0c\u5728\u5b89\u88c5\u914d\u7f6e\u7cfb\u7edf\u65f6\u57fa\u672c\u5df2\u7ecf\u4fee\u6539\u597d\u4e86\u3002\u7136\u540e\u6ce8\u91ca\u6389\/etc\/httpd\/conf\/httpd.conf\u4e2d\u7684LoadModule unique_id_module modules\/mod_unique_id.so\u8fd9\u4e2a\u6a21\u5757\u3002\u542f\u52a8httpd\uff0csudo \/etc\/rc.d\/httpd start\u3002\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165<code><a href=\"http:\/\/localhost\/\" rel=\"nofollow\">http:\/\/localhost\/<\/a><\/code>\u5e94\u8be5\u5c31\u53ef\u4ee5\u89c1\u5230\u4e00\u4e2a\u7b80\u5355\u7684Apache\u6d4b\u8bd5\u9875\u9762\u3002<\/p>\n<p>\u914d\u7f6ephp\u3002\u5728\/etc\/httpd\/conf\/httpd.conf\u4e2d\u505a\u5982\u4e0b\u4fee\u6539\uff1a<\/p>\n<ul>\n<li>\u628aLoadModule php5_module modules\/libphp5.so\u6dfb\u52a0\u5230 &#8220;LoadModule&#8221; \u5217\u8868\u7684\u540e\u9762\u3002<\/li>\n<\/ul>\n<ul>\n<li>\u628a Include \/etc\/httpd\/conf\/extra\/php5_module.conf\u6dfb\u52a0\u5230 &#8220;include&#8221; \u5217\u8868\u7684\u540e\u9762\u3002<\/li>\n<\/ul>\n<p>\u91cd\u542fApache\u662f\u53ea\u751f\u6548\uff0csudo \/etc\/rc.d\/httpd restart.<\/p>\n<p>\u6d4b\u8bd5 PHP: <a href=\"http:\/\/localhost\/test.php\" rel=\"nofollow\">http:\/\/localhost\/test.php<\/a><\/p>\n<p>\u5982\u679c\u6ca1\u6709\u751f\u6548\uff0c\u7f16\u8f91\u4e00\u4e2atest.php\uff0csudo nano \/srv\/http\/test.php\uff0c\u8f93\u5165\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre>&lt;?php phpinfo();\u00a0?&gt;<\/pre>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;PHP Test Page&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\nThis is Arch Linux, running PHP.\r\n\r\n&lt;?php\r\n  phpinfo();\r\n?&gt;\r\n&lt;\/p&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n\u6d4b\u8bd5\u5982\u679c\u53ea\u663e\u793a\u6587\u4ef6\u5185\u5bb9\u3002\u5219\u5728\/etc\/httpd\/conf\/httpd.conf\u4e2d\u6dfb\u52a0\uff1a<\/pre>\n<pre> AddType application\/x-httpd-php .php\r\n AddType application\/x-httpd-php-source .phps\r\n\r\n\u51fa\u6765\u7684\u6548\u679c\u5982\u56fe\uff1a\r\n<a href=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2011\/08\/Screenshot-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-188\" title=\"Screenshot-3\" src=\"http:\/\/www.hsyyf.me\/wp-content\/uploads\/2011\/08\/Screenshot-3.png\" alt=\"\" width=\"603\" height=\"325\" \/><\/a>\r\n\u914d\u7f6eMySQL\u3002\u53d6\u6d88\/etc\/php\/php.ini\u6587\u4ef6\u4e2d\u7684<code> ;extension=mysql.so<\/code> \u6ce8\u91ca\u3002\r\n\u542f\u52a8mysqld\uff0csudo \/etc\/rc.d\/mysqld start .<\/pre>\n<pre>\u8bbe\u7f6eroot\u5bc6\u7801\uff0c\u5e76\u767b\u5f55\u6d4b\u8bd5\u3002\r\n mysqladmin -u root password <em>password<\/em>\r\n mysql -u root -p\r\nexit\u9000\u51faMySQL\u3002\r\n\u57fa\u672c\u914d\u7f6eLAMP\u5c31\u5dee\u4e0d\u591a\u662f\u8fd9\u4e9b\u4e86\u3002\u5982\u679c\u6253\u7b97\u957f\u671f\u4f7f\u7528\u7684\u8bdd\uff0c\u5728deamon\u4e2d\u6dfb\u52a0mysqld\u548chttpd\u7684\u542f\u52a8\u5373\u53ef\u3002\r\nUbuntu\u5219\u76f8\u5bf9\u7b80\u5355\u7684\u591a\uff0c\u4e00\u53e5apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql\u5373\u53ef\u5b8c\u5168\u5b89\u88c5\u3002<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u95f2\u6765\u65e0\u4e8b\uff0c\u62ff\u7740Arch\u81ea\u5df1\u88c5\u4e86\u4e2aLAMP\uff0c\u4e0a\u7f51\u641c\u8d44\u6599\u53d1\u73b0Arch\u7684Wiki\u8fd8\u771f\u662f\u8be6\u7ec6\u5230\u5bb6\u4e86\uff0c\u8fd9\u90fd\u6709\uff0c\u800c\u4e14\u8fd8\u6709\u5e38 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3],"tags":[13,34,4],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-3","tag-arch","tag-lamp","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":0,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hsyyf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}