{"id":87,"date":"2017-11-06T14:10:16","date_gmt":"2017-11-06T06:10:16","guid":{"rendered":"http:\/\/kkong.net\/?p=87"},"modified":"2017-11-06T14:27:30","modified_gmt":"2017-11-06T06:27:30","slug":"lamp%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85%e5%8c%85","status":"publish","type":"post","link":"https:\/\/kkong.net\/?p=87","title":{"rendered":"LAMP\u4e00\u952e\u5b89\u88c5\u5305"},"content":{"rendered":"<p>\u7cfb\u7edf\u9700\u6c42<\/p>\n<p>\u7cfb\u7edf\u652f\u6301\uff1aCentOS 6+\/Debian 7+\/Ubuntu 12+<br \/>\n\u5185\u5b58\u8981\u6c42\uff1a\u2265 512MB<br \/>\n\u786c\u76d8\u8981\u6c42\uff1a\u81f3\u5c11 5GB \u4ee5\u4e0a\u7684\u5269\u4f59\u7a7a\u95f4<br \/>\n\u670d\u52a1\u5668\u5fc5\u987b\u914d\u7f6e\u597d \u8f6f\u4ef6\u6e90 \u548c \u53ef\u8fde\u63a5\u5916\u7f51<br \/>\n\u5fc5\u987b\u5177\u6709\u7cfb\u7edf root \u6743\u9650<br \/>\n\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u5168\u65b0\u7cfb\u7edf\u6765\u5b89\u88c5<br \/>\n\u652f\u6301\u7ec4\u4ef6<\/p>\n<p>\u652f\u6301 PHP \u81ea\u5e26\u51e0\u4e4e\u6240\u6709\u7ec4\u4ef6<br \/>\n\u652f\u6301 MySQL\u3001MariaDB\u3001Percona Server\u6570\u636e\u5e93<br \/>\n\u652f\u6301 Redis\uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 XCache \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 Swoole \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 Memcached \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 ImageMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 GraphicsMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 ZendGuardLoader \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u652f\u6301 ionCube Loader \uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\u81ea\u52a9\u5347\u7ea7 Apache\uff0cPHP\uff0cphpMyAdmin\uff0cMySQL\/MariaDB\/Percona Server\u81f3\u6700\u65b0\u7248\u672c<br \/>\n\u547d\u4ee4\u884c\u65b0\u589e\u865a\u62df\u4e3b\u673a\uff08\u4f7f\u7528 lamp \u547d\u4ee4\uff09\uff0c\u64cd\u4f5c\u7b80\u4fbf<br \/>\n\u652f\u6301\u4e00\u952e\u5378\u8f7d<br \/>\n\u5b89\u88c5\u6b65\u9aa4<\/p>\n<p>\u4e8b\u524d\u51c6\u5907\uff08\u5b89\u88c5 wget\u3001screen\u3001unzip\uff0c\u521b\u5efa screen \u4f1a\u8bdd\uff09<br \/>\n\u6ce8\u610f\uff1a\u53cc\u659c\u6760\/\/\u540e\u7684\u5185\u5bb9\u4e0d\u8981\u590d\u5236\u8f93\u5165<\/p>\n<p><code class=\"prettyprint\" >yum -y install wget screen git      \/\/ for CentOS<br \/>\napt-get -y install wget screen git  \/\/ for Debian\/Ubuntu<br \/>\ngit clone \u5e76\u8d4b\u4e88\u811a\u672c\u6267\u884c\u6743\u9650<br \/>\ngit clone https:\/\/github.com\/teddysun\/lamp.git<br \/>\ncd lamp<br \/>\nchmod +x *.sh<br \/>\n\u5f00\u59cb\u5b89\u88c5<br \/>\nscreen -S lamp<br \/>\n.\/lamp.sh<\/code><br \/>\n\u7ec4\u4ef6\u5b89\u88c5<\/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>\u4f7f\u7528\u63d0\u793a<\/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<br \/>\n\u5982\u4f55\u5347\u7ea7<\/p>\n<p>\u6ce8\u610f\uff1a\u53cc\u659c\u6760\/\/\u540e\u7684\u5185\u5bb9\u4e0d\u8981\u590d\u5236\u8f93\u5165<\/p>\n<p>git pull                 \/\/ Get latest version<br \/>\n.\/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<br \/>\n\u5982\u4f55\u5378\u8f7d<\/p>\n<p>.\/uninstall.sh<br \/>\n\u7a0b\u5e8f\u76ee\u5f55<\/p>\n<p>MySQL \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mysql<br \/>\nMySQL \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mysql\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<br \/>\nMariaDB \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mariadb<br \/>\nMariaDB \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mariadb\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<br \/>\nPercona \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/percona<br \/>\nPercona \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/percona\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<br \/>\nPHP \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/php<br \/>\nApache \u5b89\u88c5\u76ee\u5f55\uff1a \/usr\/local\/apache<br \/>\n\u547d\u4ee4\u4e00\u89c8<\/p>\n<p>MySQL \u6216 MariaDB \u6216 Percona \u547d\u4ee4<br \/>\n\/etc\/init.d\/mysqld (start|stop|restart|status)<br \/>\nApache \u547d\u4ee4<br \/>\n\/etc\/init.d\/httpd (start|stop|restart|status)<br \/>\nMemcached \u547d\u4ee4\uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\/etc\/init.d\/memcached (start|stop|restart|status)<br \/>\nRedis \u547d\u4ee4\uff08\u53ef\u9009\u5b89\u88c5\uff09<br \/>\n\/etc\/init.d\/redis-server (start|stop|restart|status)<br \/>\n\u7f51\u7ad9\u6839\u76ee\u5f55<\/p>\n<p>\u9ed8\u8ba4\u7684\u7f51\u7ad9\u6839\u76ee\u5f55\uff1a \/data\/www\/default<\/p>\n<p>\u672c\u6587\u8f6chttps:\/\/lamp.sh\/install.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u7edf\u9700\u6c42 \u7cfb\u7edf\u652f\u6301\uff1aCentOS 6+\/Debian 7+\/Ubuntu 12+ \u5185\u5b58\u8981\u6c42\uff1a\u2265 512MB \u786c [&hellip;]<\/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:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/posts\/87"}],"collection":[{"href":"https:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kkong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=87"}],"version-history":[{"count":7,"href":"https:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/kkong.net\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/kkong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kkong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kkong.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}