{"id":12,"date":"2011-05-21T12:38:49","date_gmt":"2011-05-21T04:38:49","guid":{"rendered":"http:\/\/www.withonly.com\/?p=12"},"modified":"2011-05-21T12:38:49","modified_gmt":"2011-05-21T04:38:49","slug":"mysqlapache2php%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/blog.5danyuan.com\/?p=12","title":{"rendered":"mysql+apache2+php\u5b89\u88c5"},"content":{"rendered":"<p>\u548c\u5f88\u591a\u4eba\u4e00\u6837\uff0c\u7b2c\u4e00\u7bc7\u6587\u7ae0\u90fd\u662f\u8bf4\u5f00\u59cb\u5199\u535a\u5ba2\u4e86\u8bf8\u5982\u6b64\u7c7b\u7684\u3002<\/p>\n<p>\u662f\u7684\uff0c\u6211\u53c8\u56de\u6765\u4e86\uff0c\u786e\u5207\u5730\u8bf4\uff0c\u662f\u7ec8\u4e8e\u56de\u6765\u4e86\u3002\u76f8\u5bf9\u800c\u8a00\uff0c\u6211\u6bd4\u6211\u7684\u670b\u53cb\u4eec\u5199\u6587\u5b57\u7684\u6b21\u6570\u8981\u591a\u7684\u591a\uff0c\u60f3\u5199\u70b9\u4ec0\u4e48\u7684\u613f\u671b\u4e5f\u66f4\u5f3a\u70c8\u4e00\u4e9b\u3002<\/p>\n<p>\u8fd9\u4e00\u6b21\uff0c\u6700\u7ec8\u9009\u62e9\u4e86 wordpress \uff0c\u653e\u5f03\u4e86\u6211\u4ee5\u524d\u81ea\u5df1\u7528 net \u5199\u7684\u90a3\u4e2a\u7a0b\u5e8f\u3002\u81f3\u4e8e\u5148\u524d\u7684\u6587\u5b57\u561b\uff0c\u7b49\u4f1a\u5f04\u4e86\u6211\u518d\u8fc1\u79fb\u8fc7\u6765\uff0c\u8001\u5b9e\u8bf4\uff0cwordpress \u8fd8\u4e0d\u719f\u6089\uff0c\u4f30\u8ba1\u8fc1\u79fb\u6210\u672c\u6bd4\u8f83\u5927\u3002<\/p>\n<p>\u6709\u4e86\u50cf Jerry \u540c\u5b66\u8fd9\u6837\u4e0d\u6298\u817e\u4e0d\u8212\u670d\u65af\u57fa\u7684\u5148\u9a71\u8005\uff0c\u505a\u8d77\u6765\u5c31\u65b9\u4fbf\u4e86\u5f88\u591a\uff0c\u4e5f\u5728 <a title=\"php\u4e0a\u9762\u7684VPS\" href=\"http:\/\/www.linode.com\" target=\"_blank\">linode<\/a> \u4e0a\u9762\u4e70\u4e86 VPS \uff0c\u7ebf\u8def\u7684\u9009\u62e9\u554a\uff0c\u73af\u5883\u7684\u642d\u914d\u90fd\u5f88\u6709\u53c2\u8003\u610f\u4e49\u3002\u5f53\u7136\u8fd9\u4e48\u505a\u4e5f\u8981\u5931\u53bb\u70b9\u4ec0\u4e48\uff0c\u90a3\u5c31\u662f\u4e0a\u73ed\u65f6\u95f4\u5c31\u65e0\u6cd5\u8bbf\u95ee\u8fd9\u4e2a\u7f51\u7ad9\u4e86\uff0c\u8fdc\u60f3\u7684\u4ee3\u7406\u5c01\u9501\u4e86\u5f88\u591a\u4e1c\u897f\uff0c\u5176\u4e2d\u7684\u60b2\u6006\u81ea\u7136\u4e0d\u5fc5\u591a\u8a00\u3002<\/p>\n<p>\u5b66\u4e60\uff0c\u59cb\u7ec8\u662f\u52a8\u529b\uff0c\u5b66\u4e86\u86ee\u591a\u4e1c\u897f\u7684\uff0c\u6211\u89c9\u5f97\u5f88\u5947\u602a\u5f88\u53e6\u7c7b\u7684\u4e00\u4e9b\u73a9\u610f\u513f\u3002<\/p>\n<p>\u7b2c\u4e00\u6b21\u7528\u4fe1\u7528\u5361\u8fdb\u884c\u5883\u5916\u652f\u4ed8\uff0c\u521a\u5f00\u59cb\u652f\u4ed8\u7684\u65f6\u5019\u5f04\u4e86\u534a\u5929\u3002<\/p>\n<p>\u7cfb\u7edf\u9009\u62e9\u7684\u662f Ubuntu+Apache+Mysql+PHP\u3002\u8f93\u5165\u547d\u4ee4\uff1a<\/p>\n<p>sudo apt-get install mysql-server<\/p>\n<p>sudo apt-get install apache2<\/p>\n<p>\u5b89\u88c5PHP<\/p>\n<p>sudo apt-get install php5 libapache2-mod-php5<\/p>\n<p>sudo apt-get install libapache2-mod-auth-mysql<\/p>\n<p>sudo apt-get install php5-mysql<\/p>\n<p>sudo apt-get install php5-gd<\/p>\n<p>\u5230\u8fd9\u91cc\u7684\u65f6\u5019\u53ef\u4ee5\u91cd\u542f\u4e0bapache\u770b\u4e00\u770b\u6548\u679c<\/p>\n<p>sudo \/etc\/init.d\/apache2 restart<\/p>\n<p>\u5b89\u88c5phpmyadmin<\/p>\n<p>sudo apt-get install phpmyadmin<\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u7b2c\u4e00\u6b65\u57fa\u672c\u4e0a\u5c31\u5b8c\u6210\u4e86\uff0c\u9700\u8981\u89e3\u51b3\u7684\u8fd8\u5728\u540e\u9762\u3002\u8fd9\u91cc\u5c0f\u7ed3\u4e00\u4e0b\uff0c\u4ece\u8fd9\u4e9b\u547d\u4ee4\u4e2d\u5b66\u4e60\u4e86sudo apt-get install\uff0c\u6b64\u5916\u8fd8\u6709remove\u3002\u7ecf\u8fc7\u641c\u7d22\uff0c\u77e5\u9053\u4e86apache\u9ed8\u8ba4\u7684\u7f51\u7ad9\u4f4d\u7f6e\u662f\u5728 \/var\/www\/\uff0c\u5728\u5b89\u88c5\u4e86phpmyadmin \u540e\uff0c\u4e0d\u77e5\u9053\u5982\u4f55\u8bbf\u95ee\uff0c\u540e\u6765\u624d\u53d1\u73b0\u9700\u8981\u590d\u5236\u6587\u4ef6\u5939\u3002sudo cp -rf \/usr\/share\/phpmyadmin \/var\/www \u3002<\/p>\n<p>\u6211\u4ee5\u4e3a \/etc\/\u6709\u70b9\u7c7b\u4f3c windows \u4e0b\u9762\u7684 Programe Files \u6587\u4ef6\u5939\u3002<\/p>\n<p>\u518d\u5b89\u88c5 wordpress \uff0c\u6211\u662f\u5148\u89e3\u538b\u7f29\u5230\u4e34\u65f6\u6587\u4ef6\u5939\u4e0b\uff0c\u6211\u89c9\u5f97 tmp \u5e94\u8be5\u662f\u4e34\u65f6\u6587\u4ef6\u5939\u5427:<\/p>\n<p>cd \/tmp<\/p>\n<p>sudo wget <a href=\"http:\/\/cn.wordpress.org\/wordpress-3.1.2-zh_CN.tar.gz\">http:\/\/cn.wordpress.org\/wordpress-3.1.2-zh_CN.tar.gz<\/a><\/p>\n<p>sudo tar zvxf wordpress-3.1.2-zh_CN.tar.gz<\/p>\n<p>\u7136\u540e\u518d\u590d\u5236\u5230\u7f51\u7ad9\u76ee\u5f55\u4e0b<\/p>\n<p>sudo cp -rf wordpress \/var\/site\/<\/p>\n<p>\u6309\u7167\u7f51\u4e0a\u7684\u4fee\u6539\u6743\u9650\u4ec0\u4e48\u7684<\/p>\n<p>cd \/var\/www\/<\/p>\n<p>sudo chown -R www-data:www-data wordpress<\/p>\n<p>\u8bbf\u95ee\u7f51\u7ad9\uff0c\u8fdb\u5165\u5b89\u88c5\uff0c\u914d\u7f6e\u7684\u8fc7\u7a0b\u4e2d\u51fa\u9519\u4e86\uff0c\u540e\u6765\u53d1\u73b0 wordpress \u662f\u8981\u5148\u628a\u6570\u636e\u5e93\u7ed9\u5efa\u7acb\u8d77\u6765\u7684\u3002\u5e78\u597d\u6709 phpmyadmin \uff0c\u6700\u540e\uff0c\u6211\u770b\u5230\u4e86\u6210\u529f\u7684\u754c\u9762\u3002<\/p>\n<p>\u622a\u81f3\u5230\u73b0\u5728\uff0c\u6709\u51e0\u4e2a\u95ee\u9898\u6211\u6709\u610f\u7684\u6ca1\u6709\u8bf4\u51fa\u6765\uff0c\u6211\u6253\u7b97\u5728\u4e0b\u9762\u4e00\u7bc7\u65e5\u5fd7\u91cc\u63d0\u53ca\u3002\u81f3\u5c11\u73b0\u5728\u770b\u8d77\u6765\u8fd8\u50cf\u662f\u90a3\u4e48\u56de\u4e8b\uff0c\u6211\u6ca1\u6709\u7ba1\u6743\u9650\uff0c\u6ca1\u6709\u7ba1\u76ee\u5f55\uff0c\u6ca1\u6709\u7ba1\u914d\u7f6e\uff0c\u4e00\u4e2a\u5c0f\u767d\u7248\u7684\u7cfb\u7edf\u7b97\u662f\u7ed9\u5f04\u597d\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u548c\u5f88\u591a\u4eba\u4e00\u6837\uff0c\u7b2c\u4e00\u7bc7\u6587\u7ae0\u90fd\u662f\u8bf4\u5f00\u59cb\u5199\u535a\u5ba2\u4e86\u8bf8\u5982\u6b64\u7c7b\u7684\u3002 \u662f\u7684\uff0c\u6211\u53c8\u56de\u6765\u4e86\uff0c\u786e\u5207\u5730\u8bf4\uff0c\u662f\u7ec8\u4e8e\u56de\u6765\u4e86\u3002\u76f8\u5bf9\u800c\u8a00\uff0c\u6211 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12"}],"version-history":[{"count":0,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5danyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}