<br />
<b>Warning</b>:  Constant WP_DEBUG already defined in <b>/home/wwwroot/default/wp-config.php</b> on line <b>97</b><br />
{"id":215,"date":"2017-10-14T10:11:44","date_gmt":"2017-10-14T02:11:44","guid":{"rendered":"http:\/\/candy994.cn\/?p=215"},"modified":"2017-10-14T10:11:44","modified_gmt":"2017-10-14T02:11:44","slug":"%e8%87%aa%e5%bb%ba%e7%ab%99lamp-linuxapachemysqlphp","status":"publish","type":"post","link":"https:\/\/candy994.cn\/?p=215","title":{"rendered":"\u81ea\u5efa\u7ad9lamp Linux+Apache+Mysql+Php"},"content":{"rendered":"<p><strong><b>\u7cfb\u7edf\u9700\u6c42<\/b><\/strong><\/p>\n<ul>\n<li>\u7cfb\u7edf\u652f\u6301\uff1aCentOS\/Debian\/Ubuntu<\/li>\n<li>\u5185\u5b58\u8981\u6c42\uff1a\u2265 512M<\/li>\n<li>\u786c\u76d8\u8981\u6c42\uff1a\u81f3\u5c11 2GB \u4ee5\u4e0a\u7684\u5269\u4f59\u7a7a\u95f4<\/li>\n<li>\u670d\u52a1\u5668\u5fc5\u987b\u914d\u7f6e\u597d<strong><b>\u8f6f\u4ef6\u6e90<\/b><\/strong>\u00a0\u548c\u00a0<strong><b>\u53ef\u8fde\u63a5\u5916\u7f51<\/b><\/strong><\/li>\n<li>\u5fc5\u987b\u5177\u6709\u7cfb\u7edf root \u6743\u9650<\/li>\n<li>\u5efa\u8bae\u4f7f\u7528\u5e72\u51c0\u7cfb\u7edf\u5168\u65b0\u5b89\u88c5<\/li>\n<\/ul>\n<p><strong><b>\u652f\u6301\u7ec4\u4ef6<\/b><\/strong><!--more--><\/p>\n<ul>\n<li>\u652f\u6301 PHP \u81ea\u5e26\u51e0\u4e4e\u6240\u6709\u7ec4\u4ef6<\/li>\n<li>\u652f\u6301 MySQL\u3001MariaDB\u3001Percona \u6570\u636e\u5e93<\/li>\n<li>\u652f\u6301 Redis\uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 XCache \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 Swoole \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 Memcached \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 ImageMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 GraphicsMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 ZendGuardLoader \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 ionCube PHP Loader \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u81ea\u52a9\u5347\u7ea7 Apache\uff0cPHP\uff0cphpMyAdmin\uff0cMySQL\/MariaDB\/Percona \u81f3\u6700\u65b0\u7248\u672c<\/li>\n<li>\u547d\u4ee4\u884c\u65b0\u589e\u865a\u62df\u4e3b\u673a\uff08\u4f7f\u7528 lamp \u547d\u4ee4\uff09\uff0c\u64cd\u4f5c\u7b80\u4fbf<\/li>\n<li>\u652f\u6301\u4e00\u952e\u5378\u8f7d<\/li>\n<\/ul>\n<p><strong><b>\u5b89\u88c5\u6b65\u9aa4<\/b><\/strong><\/p>\n<ol>\n<li>\u4e8b\u524d\u51c6\u5907\uff08\u5b89\u88c5 wget\u3001screen\u3001unzip\uff0c\u521b\u5efa screen \u4f1a\u8bdd\uff09<\/li>\n<\/ol>\n<p>\u6ce8\u610f\uff1a\u53cc\u659c\u6760\/\/\u540e\u7684\u5185\u5bb9\u4e0d\u8981\u590d\u5236\u8f93\u5165<\/p>\n<p>yum -y install wget screen unzip \/\/ for CentOS<br \/>\napt-get -y install wget screen unzip \/\/ for Debian\/Ubuntu<\/p>\n<ol>\n<li>\u4e0b\u8f7d\u3001\u89e3\u538b\u3001\u8d4b\u4e88\u6267\u884c\u6743\u9650<\/li>\n<\/ol>\n<p>wget -O lamp.zip https:\/\/github.com\/teddysun\/lamp\/archive\/master.zip<br \/>\nunzip lamp.zip<br \/>\ncd lamp-master\/<br \/>\nchmod +x *.sh<\/p>\n<ol>\n<li>\u5b89\u88c5 LAMP \u4e00\u952e\u5b89\u88c5\u5305<\/li>\n<\/ol>\n<p>screen -S lamp<br \/>\n.\/lamp.sh<\/p>\n<p><strong><b>\u7ec4\u4ef6\u5b89\u88c5<\/b><\/strong><\/p>\n<p>\u5173\u4e8e\u672c\u811a\u672c\u652f\u6301\u7684\u6240\u6709\u7ec4\u4ef6\uff0c\u90fd\u53ef\u4ee5\u5728\u811a\u672c\u4ea4\u4e92\u91cc\u53ef\u9009\u5b89\u88c5\u3002<\/p>\n<p><strong><b>\u4f7f\u7528\u63d0\u793a<\/b><\/strong><\/p>\n<p>lamp add \u521b\u5efa\u865a\u62df\u4e3b\u673a<br \/>\nlamp del \u5220\u9664\u865a\u62df\u4e3b\u673a<br \/>\nlamp list \u5217\u51fa\u865a\u62df\u4e3b\u673a<\/p>\n<p><strong><b>\u5982\u4f55\u5347\u7ea7<\/b><\/strong><\/p>\n<p>.\/upgrade.sh \/\/ Select one to upgrade<br \/>\n.\/upgrade.sh apache \/\/ Upgrade Apache<br \/>\n.\/upgrade.sh db \/\/ Upgrade MySQL\/MariaDB\/Percona<br \/>\n.\/upgrade.sh php \/\/ Upgrade PHP<br \/>\n.\/upgrade.sh phpmyadmin \/\/ Upgrade phpMyAdmin<\/p>\n<p><strong><b>\u5982\u4f55\u5378\u8f7d<\/b><\/strong><\/p>\n<p>.\/uninstall.sh<\/p>\n<p><strong><b>\u7a0b\u5e8f\u76ee\u5f55<\/b><\/strong><\/p>\n<ul>\n<li>MySQL \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mysql<\/li>\n<li>MySQL \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mysql\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<\/li>\n<li>MariaDB \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mariadb<\/li>\n<li>MariaDB \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mariadb\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<\/li>\n<li>Percona \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/percona<\/li>\n<li>Percona \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/percona\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<\/li>\n<li>PHP \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/php<\/li>\n<li>Apache \u5b89\u88c5\u76ee\u5f55\uff1a \/usr\/local\/apache<\/li>\n<\/ul>\n<p><strong><b>\u547d\u4ee4\u4e00\u89c8<\/b><\/strong><\/p>\n<ul>\n<li>MySQL \u6216 MariaDB \u6216 Percona \u547d\u4ee4<\/li>\n<\/ul>\n<p>\/etc\/init.d\/mysqld (start|stop|restart|status)<\/p>\n<ul>\n<li>Apache \u547d\u4ee4<\/li>\n<\/ul>\n<p>\/etc\/init.d\/httpd (start|stop|restart|status)<\/p>\n<ul>\n<li>Memcached \u547d\u4ee4\uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<\/ul>\n<p>\/etc\/init.d\/memcached (start|stop|restart|status)<\/p>\n<ul>\n<li>Redis \u547d\u4ee4\uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\/etc\/init.d\/redis-server (start|stop|restart|status)<\/li>\n<\/ul>\n<p><strong><b>\u7f51\u7ad9\u6839\u76ee\u5f55<\/b><\/strong><\/p>\n<p>\u9ed8\u8ba4\u7684\u7f51\u7ad9\u6839\u76ee\u5f55\uff1a \/data\/www\/default<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u7edf\u9700\u6c42 \u7cfb\u7edf\u652f\u6301\uff1aCentOS\/Debian\/Ubuntu \u5185\u5b58\u8981\u6c42\uff1a\u2265 512M \u786c\u76d8\u8981\u6c42\uff1a\u81f3\u5c11 2GB \u4ee5\u4e0a\u7684\u5269\u4f59\u7a7a\u95f4 \u670d\u52a1\u5668\u5fc5\u987b\u914d\u7f6e\u597d\u8f6f\u4ef6\u6e90\u00a0\u548c\u00a0\u53ef\u8fde\u63a5&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/candy994.cn\/?p=215\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/posts\/215"}],"collection":[{"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/candy994.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=215"}],"version-history":[{"count":1,"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/posts\/215\/revisions"}],"predecessor-version":[{"id":216,"href":"https:\/\/candy994.cn\/index.php?rest_route=\/wp\/v2\/posts\/215\/revisions\/216"}],"wp:attachment":[{"href":"https:\/\/candy994.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/candy994.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/candy994.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}