{"id":1073,"date":"2014-04-29T15:31:46","date_gmt":"2014-04-29T07:31:46","guid":{"rendered":"http:\/\/www.51cos.com\/?p=1073"},"modified":"2014-04-30T19:02:21","modified_gmt":"2014-04-30T11:02:21","slug":"%e4%bd%bf%e7%94%a8%e4%ba%9a%e9%a9%ac%e9%80%8a%ef%bc%88amazon%ef%bc%89aws%e5%ae%89%e8%a3%85lnmp%ef%bc%88linuxnginxmysqlphp%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=1073","title":{"rendered":"\u4f7f\u7528\u4e9a\u9a6c\u900a\uff08Amazon\uff09AWS\u5b89\u88c5LNMP\uff08Linux+Nginx+Mysql+PHP\uff09"},"content":{"rendered":"<p><strong>1.<\/strong>\u767b\u5f55\u540e\u8fdb\u5165https:\/\/console.aws.amazon.com\/console\/home?region=ap-northeast-1<\/p>\n<p><strong>2.<\/strong>\u9009\u62e9\u201cEC2 Virtual Servers in the Cloud\u201d\u9009\u9879<\/p>\n<p><strong>3.<\/strong>\u70b9\u51fb&#8221;launch instances&#8221;,\u9009\u62e9\u8981\u5b89\u88c5\u7684\u955c\u50cf\uff0c\u6bd4\u5982\u6211\u9009\u62e9\u7684\u662fubuntu\uff0c\u57fa\u672c\u4e0a\u4e00\u76f4\u4e0b\u4e00\u6b65\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\uff0c\u6ce8\u610f\u5176\u5b9e\u4e00\u6b65\u662fcreat a new key pair \uff0c\u7136\u540e\u4e0b\u8f7d\u5230\u672c\u5730\uff0c\u8fd9\u4e2a\u540e\u9762\u767b\u9646\u4f1a\u7528\u5230\u3002\u5176\u4ed6\u540d\u8bcd\u89e3\u91ca\u5982\u4e0b\uff1a<\/p>\n<p>Amazon S3\uff1a S3\u5b58\u50a8\u670d\u52a1\uff0c\u53ef\u4e0d\u7528<\/p>\n<p>Amazon EC2\uff1a \u7c7b\u4f3c\u4f20\u7edf\u7684VPS\u670d\u52a1\uff0c\u53ef\u4ee5\u5728\u8fd9\u91cc\u542f\u52a8Instance\uff0c\u589e\u52a0EBS\u786c\u76d8<\/p>\n<p>Region\uff1a \u56db\u4e2a\u53ef\u9009\u533a\u57df\uff0c\u4e00\u822c\u6765\u8bb2\u56fd\u5185\u8fde\u897f\u6d77\u5cb8\u52a0\u5dde\u673a\u623f\u8f83\u5feb\uff0c\u5982\u679c\u5bf9\u56fd\u5185\u63d0\u4f9bweb\u670d\u52a1\uff0c\u4e5f\u53ef\u4ee5\u8003\u8651\u65b0\u52a0\u5761\u673a\u623f\uff0c\u65b0\u52a0\u5761\u673a\u623f\u4ef7\u94b1\u8981\u8d35\u4e00\u4e9b\u3002<\/p>\n<p>Instances\uff1a \u6240\u6709\u5b9e\u4f8b\uff08VPS\uff09<\/p>\n<p>AMIs\uff1a \u6240\u6709AMIs\uff0c\u53ef\u4ee5\u770b\u6210\u662f\u4e0d\u7528\u5b89\u88c5\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9009\u62e9\u4e00\u4e2a\u542f\u52a8\u5373\u5f97\u5230\u4e00\u4e2a Instance\u3002<\/p>\n<p>Volumes\uff1aEBS\u786c\u76d8\uff0cEC2\u9ed8\u8ba4\u4e0d\u5e26\u5b58\u50a8\uff0c\u867d\u7136\u53ef\u4ee5\u901a\u8fc7\u5b58\u50a8\u5728S3\u7684AMI\u542f\u52a8\uff0c\u4f46\u5f53\u4f60\u5173\u95ed\u6216\u91cd\u542fInstance\u540e\uff0c\u6240\u6709\u6570\u636e\u90fd\u4f1a\u6d88\u5931\u3002\u800c\u901a\u8fc7\u5b58\u50a8\u5728EBS\u7684AMI\u542f\u52a8\u5219\u4e0d\u4f1a\u6709\u8fd9\u4e2a\u95ee\u9898\u3002\u6240\u6709\u6570\u636e\u53d8\u66f4\u4fdd\u5b58\u5230EBS\u4e2d\u3002\u60a8\u4e5f\u53ef\u4ee5\u6dfb\u52a0\u989d\u5916\u7684EBS\u6302\u5728\u5230\u67d0\u4e2aInstance\u3002<\/p>\n<p>Snapshots\uff1a \u589e\u91cf\u5907\u4efd\u7684\u7cfb\u7edf\u5feb\u7167\u3002<\/p>\n<p>Elastic IP\uff1a EC2\u7684Instance\u662f\u53d8\u5316\u7684\uff0c\u5982\u679c\u4f60\u9700\u8981\u56fa\u5b9a\u7684IP\uff0c\u53ef\u4ee5\u5728\u8fd9\u91cc\u8bbe\u7f6e\uff0c\u4e0d\u8fc7\u9700\u8981\u6ce8\u610f\uff0c\u5982\u679c\u4f60\u5206\u914d\u4e86\u56fa\u5b9aIP\u4f46\u662f\u6ca1\u6709\u6302\u8f7d\u5230\u4efb\u4f55Instance\u4e0a\uff0c\u4f60\u4f1a\u88abAmazon\u60e9\u7f5a\u6027\u6536\u8d39\u3002<\/p>\n<p>Launch Instance\uff1a \u70b9\u51fb\u542f\u52a8\u65b0\u7684Instance\u5b9e\u4f8b\u3002<\/p>\n<p><strong>4.<\/strong>\u901a\u8fc7Putty\u7b49SSH\u5de5\u5177\u8fde\u63a5\u3002<\/p>\n<p>\u4e0b\u8f7dputty\u5de5\u5177\u5305\uff1ahttp:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/putty.zip<\/p>\n<p>\u8f6c\u6362\u5bc6\u94a5\uff1aPuTTY\u4e0d\u652f\u6301Amazon EC2\u4ea7\u751f\u7684\u5bc6\u94a5\u683c\u5f0f\u3002\u4f46\u662fPuTTY\u7684\u5de5\u5177PuTTYgen\u53ef\u4ee5\u5c06\u5bc6\u94a5\u8f6c\u6362\u4e3aPuTTY\u6240\u9700\u7684\u683c\u5f0f\u3002<\/p>\n<p>\u6b65\u9aa4\uff1a<\/p>\n<p>1)\u6253\u5f00 PuTTYgen\u3002<\/p>\n<p>2)\u70b9\u51fbLOAD\uff0c\u6d4f\u89c8\u672c\u5730\u60a8\u9700\u8981\u8f6c\u6362\u7684\u79c1\u4eba\u5bc6\u94a5\u6587\u4ef6\u3002PuTTYgen\u9ed8\u8ba4\u663e\u793a.ppk\u6587\u4ef6\uff1b\u60a8\u9700\u8981\u9009\u62e9\u663e\u793a\u6240\u6709\u6587\u4ef6\uff0c\u8fd9\u6837\u60a8\u5c31\u53ef\u4ee5\u627e\u5230\u60a8\u7684.pem\u6587\u4ef6\u3002<\/p>\n<p>3)\u9009\u62e9\u60a8\u7684Pem\u5bc6\u94a5\u6587\u4ef6\uff0c\u70b9\u51fbOpen<\/p>\n<p>\u5f53\u60a8\u70b9\u51fbok\uff0cPuTTYgen\u663e\u793a\u5bf9\u8bdd\u6846\uff0c\u5305\u62ec\u60a8\u6240\u52a0\u8f7d\u7684\u5bc6\u94a5\u6587\u4ef6\u4fe1\u606f\uff0c\u5982\u516c\u5171\u5bc6\u94a5\u548c\u6307\u7eb9\u3002Amazon EC2\u6240\u751f\u6210\u7684\u662f\u4e00\u4e2a1024-bit SSH-2 RSA\u5bc6\u94a5\u3002<\/p>\n<p>4)\u70b9\u51fbSave private key \u6765\u4fdd\u5b58PuTTY\u683c\u5f0f\u7684\u5bc6\u94a5\u3002<\/p>\n<p>PuTTYgen\u4f1a\u8be2\u95ee\u60a8\u662f\u5426\u9700\u8981\u4fdd\u5b58\u5bc6\u94a5\u4e0d\u901a\u8fc7\u5bc6\u7801\u3002<\/p>\n<p>5)\u70b9\u51fbyes\uff0c \u5c06\u65b0\u751f\u6210\u7684\u5bc6\u94a5\u6539\u6210\u4e0e\u4e4b\u524d\u540c\u540d\u3002PuTTY\u4f1a\u81ea\u52a8\u6dfb\u52a0.ppk\u540e\u7f00\u3002<\/p>\n<p>8)\u6253\u5f00PuTTY\u3002\u5bf9\u8bdd\u6846\u7684\u5de6\u8fb9\u662f\u76ee\u5f55\u83dc\u5355\uff0c\u53f3\u8fb9\u662f\u57fa\u672c\u9009\u9879\u7684\u663e\u793a\u3002<\/p>\n<p>9)\u5728\u4e3b\u673a\u540d\u533a\u57df\uff0c\u8f93\u5165\u60a8\u5b9e\u4f8b\u7684\u516c\u5171DNS\u540d\u5b57\uff08\u5373host name\u586b\u5199Amazon AWS VPS\u4e3b\u673a\u7684Public DNS\uff09<\/p>\n<p>10)\u76ee\u5f55\u83dc\u5355\uff0c\u5728Connection\u4e0b\u9762\uff0c\u70b9\u51fbSSH\u548cAUTH\u3002<\/p>\n<p>11)\u70b9\u51fbBROWSES\uff0c\u9009\u62e9\u60a8\u4e4b\u524d\u751f\u4ea7\u7684\u5bc6\u94a5\u6587\u4ef6\u3002<\/p>\n<p>12)\u70b9\u51fbOpen\uff0c\u4e00\u4e2aSSH\u4f1a\u8bdd\u7a97\u53e3\u6253\u5f00\uff0cPuTTY\u663e\u793a\u4e00\u4e2a\u5b89\u5168\u8b66\u544a\uff0c\u8be2\u95ee\u60a8\u662f\u5426\u4fe1\u4efb\u4f60\u7684\u4e3b\u673a\u8fde\u63a5\u3002<\/p>\n<p>13)\u70b9\u51fbyes<\/p>\n<p>14)\u5728SSH\u5bf9\u8bdd\u6846\uff0c\u60a8\u5df2\u7ecf\u4f5c\u4e3aroot\u7528\u6237\u767b\u5f55\u4e86\u3002<\/p>\n<p>\u6ce8\u610f\uff1a\u5982\u679c\u7528root\u767b\u9646\u51fa\u73b0\u91cd\u9633\u7684\u9519\u8bef\u63d0\u793a\uff1aPlease login as the user &#8220;ubuntu&#8221; rather than the user &#8220;root&#8221;.<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u5982\u4e0b:if you use Amazon Linux AMI, the user id is &#8220;ec2-user&#8221;, and if you use &#8220;Ubuntu AMI&#8221;, the user id is &#8220;ubuntu&#8221;.\u4e5f\u5c31\u662f\u8bf4\u7528\u6237\u540d\u5e94\u8be5\u662fec2-user\u6216\u8005ubuntu<\/p>\n<p>\u53ef\u4ee5\u6572\u5165free\u547d\u4ee4\u770b\u5185\u5b58\u5927\u5c0f\uff0cdf -h\u547d\u4ee4\u770b\u786c\u76d8\u7a7a\u95f4\u5927\u5c0f\u3002<\/p>\n<p>\u5e38\u7528\u4fee\u6539\u6743\u9650\u7684\u547d\u4ee4\uff1a<\/p>\n<p>sudo chmod 600 \u00d7\u00d7\u00d7 \uff08\u53ea\u6709\u6240\u6709\u8005\u6709\u8bfb\u548c\u5199\u7684\u6743\u9650\uff09<\/p>\n<p>sudo chmod 644 \u00d7\u00d7\u00d7 \uff08\u6240\u6709\u8005\u6709\u8bfb\u548c\u5199\u7684\u6743\u9650\uff0c\u7ec4\u7528\u6237\u53ea\u6709\u8bfb\u7684\u6743\u9650\uff09<\/p>\n<p>sudo chmod 700 \u00d7\u00d7\u00d7 \uff08\u53ea\u6709\u6240\u6709\u8005\u6709\u8bfb\u548c\u5199\u4ee5\u53ca\u6267\u884c\u7684\u6743\u9650\uff09<\/p>\n<p>sudo chmod 666 \u00d7\u00d7\u00d7 \uff08\u6bcf\u4e2a\u4eba\u90fd\u6709\u8bfb\u548c\u5199\u7684\u6743\u9650\uff09<\/p>\n<p>\u66f4\u591a\u5185\u5bb9\u5efa\u8bae\u9605\u8bfb\u5b98\u65b9\u6587\u6863\uff1ahttp:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/EC2_GetStarted.html<\/p>\n<p>\u5269\u4e0b\u7684\u5c31\u662f\u5728\u547d\u4ee4\u884c\u4e0b\u5b89\u88c5lnmp\u7684\u5de5\u4f5c\u4e86\uff1a<\/p>\n<p>Debian\u4e0bLNMP\u4e00\u952e\u5b89\u88c5\uff1a\uff08Debian\u6bd4CentOS\u8282\u7701\u7ea650M\u5185\u5b58\uff09<\/p>\n<p>\uff081\uff09\u7ec8\u7aef\u6267\u884c wget -c http:\/\/soft.vpser.net\/lnmp\/lnmp0.8-full.tar.gz \uff08\u5728\u54ea\u4e2a\u76ee\u5f55\u6267\u884c\uff0c\u5c31\u5b58\u653e\u5728\u90a3\u4e2a\u76ee\u5f55\uff0cVPS\u4e00\u822c\u9ed8\u8ba4\u4fdd\u5b58\u5728\/root\uff09<\/p>\n<p>\uff082\uff09\u89e3\u538b\u5f97\u5230\u201clnmp0.8-full\u201d\u6587\u4ef6\u5939 tar zxvf lnmp0.8-full.tar.gz<\/p>\n<p>\uff083\uff09\u5207\u6362\u4e3aroot\u8eab\u4efd\uff0c\u8fdb\u5165\u4e00\u952e\u5305\u76ee\u5f55 cd \/root\/lnmp0.8-full<\/p>\n<p>\uff084\uff09\u6267\u884c\u5b89\u88c5\u811a\u672c .\/ubuntu.sh<\/p>\n<p>\uff085\uff09\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u63d0\u793a\u201c\u7ed1\u5b9a\u57df\u540d\u201d\u5230\/home\/wwwroot\/\u76ee\u5f55\uff08\u7ed1\u5b9a\u81ea\u5df1\u7684\u4e8c\u7ea7\u7ba1\u7406\u57df\u540d\uff0c\u8fd8\u9700\u5c06\u8fd9\u4e2a\u4e8c\u7ea7\u7ba1\u7406\u57df\u540d\u89e3\u6790\u5230IP\uff0c\u672c\u5730\u5b89\u88c5\u7ed1\u5b9a localhost\uff09\uff0c\u201cWhere are your servers located?\u201d\uff08\u8f93\u5165america\uff09\uff0c\u201cMySQL\u5bc6\u7801\u201d\uff08\u672c\u5730\u9ed8\u8ba4root\uff09<\/p>\n<p>\uff086\uff09\u5b89\u88c5\u597d\u540e\uff0c\u8f93\u5165\u7ed1\u5b9a\u7684\u4e8c\u7ea7\u7ba1\u7406\u57df\u540d\u5373\u53ef\u770b\u5230LNMP\u7684\u9ed8\u8ba4\u9875\u9762<\/p>\n<p>1\u3001\u6dfb\u52a0\u865a\u62df\u4e3b\u673a\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a\/root\/vhost.sh \u6839\u636e\u63d0\u793a\u8f93\u5165\u8981\u7ed1\u5b9a\u7684\u57df\u540d\uff0c\u56de\u8f66\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u66f4\u591a\u7684\u57df\u540d\uff0c\u8f93\u5165y\uff0c\u518d\u8f93\u5165\u8981\u53e6\u5916\u7ed1\u5b9a\u7684\u57df\u540d\uff0c\u591a\u4e2a\u57df\u540d\u53ef\u4ee5\u7528\u7a7a\u683c\u9694\u5f00(\u6ce8\uff1a\u5e26www\u548c\u4e0d\u5e26www\u7684\u662f\u4e0d\u540c\u7684\u57df\u540d\uff0c\u5982\u9700\u5e26www\u548c\u4e0d\u5e26\u7684www\u7684\u57df\u540d\u90fd\u8bbf\u95ee\u540c\u4e00\u4e2a\u7f51\u7ad9\u9700\u8981\u540c\u65f6\u90fd\u7ed1\u5b9a)\u3002\u518d\u8f93\u5165\u57df\u540d\u7ed1\u5b9a\u7684\u76ee\u5f55(\u7edd\u5bf9\u76ee\u5f55\uff0c\u5982\/home\/wwwroot\/lnmp\uff0c\u5982\u679c\u4e0d\u586b\u9ed8\u8ba4\u662f\/home\/wwwroot\/\u7ed1\u5b9a\u7684\u57df\u540d\uff0c\u76ee\u5f55\u4e0d\u4e00\u5b9a\u975e\u8981\u662f\/home\/wwwroot\/\uff0c\u5982\u679c\/data\/ \u4e0b\u9762\u6709\u5927\u91cf\u7684\u7a7a\u95f4\u4e5f\u53ef\u4ee5\u586b\u5199\/data\/www\/lnmp \u4e4b\u7c7b\u7684\u3002)\uff0c\u518d\u9009\u62e9\u662f\u5426\u6dfb\u52a0\u4f2a\u9759\u6001\u89c4\u5219\uff0c\u9ed8\u8ba4\u5df2\u7ecf\u6709\u4e86discuz\u3001discuzx\u3001wordpress\u3001sablog\u3001emlog\u3001dabr\u3001phpwind\u3001wp2(\u4e8c\u7ea7\u76ee\u5f55wp\u4f2a\u9759\u6001)\uff0c\u53ef\u76f4\u63a5\u8f93\u5165\u4ee5\u4e0a\u540d\u79f0\u5373\u53ef\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u81ea\u5b9a\u4e49\u4f2a\u9759\u6001\u89c4\u5219\uff0c\u76f4\u63a5\u8f93\u5165\u4e00\u4e2a\u60f3\u8981\u7684\u540d\u5b57\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u521b\u5efa\u4f2a\u9759\u6001\u6587\u4ef6\uff0c\u76f4\u63a5\u5728\/usr\/local\/nginx\/conf\/\u4f60\u81ea\u5b9a\u4e49\u7684\u4f2a\u9759\u6001\u540d\u5b57.conf \u91cc\u9762\u6dfb\u52a0\u4f2a\u9759\u6001\u89c4\u5219\u5c31\u884c(\u6ce8\uff1a\u6dfb\u52a0\u5b8c\u6267\u884c\/etc\/init.d\/nginx restart \u91cd\u542f\u751f\u6548)\u3002\u63a5\u4e0b\u6765\u4f1a\u63d0\u793a\u662f\u5426\u9700\u8981\u542f\u7528\u65e5\u5fd7\u529f\u80fd\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u9700\u8981\u542f\u52a8\uff0c\u76f4\u63a5\u8f93\u5165n\u5c31\u884c\uff0c\u5982\u9700\u542f\u52a8\uff0c\u8f93\u5165y\uff0c\u518d\u8f93\u5165\u8981\u5b9a\u4e49\u7684\u65e5\u5fd7\u6587\u4ef6\u540d\u5b57\uff0c\u56de\u8f66\u5c31\u4f1a\u81ea\u52a8\u6dfb\u52a0\u865a\u62df\u4e3b\u673a\u3002<\/p>\n<p>2\u3001\u5220\u9664\u865a\u62df\u4e3b\u673a\uff0cssh\u6267\u884c\uff1arm \/usr\/local\/nginx\/conf\/vhost\/\u57df\u540d.conf<br \/>\n\u5b89\u88c5\u5176\u4ed6\u7ec4\u4ef6<br \/>\n(\u6ce8\uff1a\u5b89\u88c5\u5982\u4e0b\u7ec4\u4ef6\uff0c\u5fc5\u987b\u5728lnmp0.9\u7684\u5b89\u88c5\u76ee\u5f55\uff0c\u5373lnmp\u538b\u7f29\u5305\u89e3\u538b\u7f29\u540ecd lnmp0.9\/\u540e\u7684\u76ee\u5f55!\uff0c\u5982\u679c\u627e\u4e0d\u5230\u53ef\u4ee5\u6267\u884cfind \/ -name eaccelerator.sh\u67e5\u627e\u3002)<br \/>\n(\u6ce8\uff1a\u4ee5\u4e0b\u7ec4\u4ef6\u4e0d\u4e00\u5b9a\u60a8\u90fd\u9700\u8981\uff0c\u8bf7\u6309\u60a8\u7684\u9700\u6c42\u4f7f\u7528!)<\/p>\n<p>1\u3001\u5b89\u88c5PureFTPd\u548cFTP\u7ba1\u7406\u9762\u677f\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/pureftpd.sh \u6309\u63d0\u793a\u8f93\u5165\u4f60MySQL\u7684root\u5bc6\u7801\u3001FTP\u7528\u6237\u7ba1\u7406\u9762\u677f\u7684\u5bc6\u7801\u3001MySQl\u7684FTP\u6570\u636e\u5e93\u5bc6\u7801(\u53ef\u76f4\u63a5\u56de\u8f66\uff0c\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5bc6\u7801)\uff0c\u56de\u8f66\u786e\u8ba4\uff0c\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5PureFTPd\uff0c\u63d0\u793a\u5b89\u88c5\u5b8cPureFTPd\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u6267\u884chttp:\/\/\u4f60\u7684\u57df\u540d\u6216IP\/ftp\/ \u8f93\u5165\u4f60\u524d\u9762\u8bbe\u7f6e\u7684FTP\u7528\u6237\u7ba1\u7406\u9762\u677f\u7684\u5bc6\u7801\uff0c\u5c31\u53ef\u4ee5\u7ba1\u7406FTP\u3002<\/p>\n<p>2\u3001\u5b89\u88c5eAccelerator\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/eaccelerator.sh \uff0c\u6309\u63d0\u793a\u9009\u62e9\u7248\u672c\uff0c\u56de\u8f66\u786e\u8ba4\u540e\uff0c\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u5e76\u91cd\u542fweb\u670d\u52a1\u3002<\/p>\n<p>3\u3001\u5b89\u88c5ionCube\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/ionCube.sh \u56de\u8f66\u786e\u8ba4\u540e\uff0c\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u5e76\u91cd\u542fweb\u670d\u52a1\u3002<\/p>\n<p>4\u3001\u5b89\u88c5imageMagick\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/imageMagick.sh \u56de\u8f66\u786e\u8ba4\u540e\uff0c\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u5e76\u91cd\u542fweb\u670d\u52a1\u3002<\/p>\n<p>5\u3001\u5b89\u88c5memcached\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/memcached.sh \u56de\u8f66\u786e\u8ba4\u540e\uff0c\u5c31\u4f1a\u81ea\u52a8\u5b89\u88c5\u5e76\u91cd\u542fweb\u670d\u52a1\u3002<br \/>\n\u5347\u7ea7\u7a0b\u5e8f<\/p>\n<p>6\u3001\u5347\u7ea7Nginx\u7248\u672c\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/upgrade_nginx.sh \u6309\u63d0\u793a\u8f93\u5165nginx\u7684\u7248\u672c\u53f7\uff0c\u59821.0.10\uff0c\u7248\u672c\u53f7\u53ef\u4ee5\u4ecehttp:\/\/nginx.org\/en\/download.html\u83b7\u53d6\u3002(\u6ce8\uff1a\u5347\u7ea7\u8fc7\u7a0b\u4e2dMySQL\u3001PHP-FPM\u5c06\u4f1a\u6682\u505c\u3002)<\/p>\n<p>7\u3001\u5347\u7ea7PHP\u7248\u672c\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a.\/upgrade_php.sh \u6309\u63d0\u793a\u8f93\u5165php\u7248\u672c\u53f7\uff0c\u59825.3.6\u3002(\u6ce8\uff1a\u67d0\u4e9b\u7f51\u7ad9\u7a0b\u5e8f\uff0c\u5982shopex\u7b49\u6709\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u5347\u7ea7\u524d\u786e\u4fdd\u4f60\u4f7f\u7528\u7684\u7a0b\u5e8f\u4ee5\u652f\u63015.3.*\u7248\u672c\u3002\u5347\u7ea7\u8fc7\u7a0b\u4e2dNginx\u3001MySQL\u3001PHP-FPM\u5c06\u4f1a\u6682\u505c\u30025.4.*\u7248\u672c\u5c5e\u6d4b\u8bd5\u7248\u6682\u672a\u6d4b\u8bd5\uff0c\u751f\u4ea7\u73af\u5883\u8bf7\u52ff\u5347\u7ea7\u52305.4.*\u3002)<br \/>\n\u72b6\u6001\u7ba1\u7406<\/p>\n<p>LNMP\u72b6\u6001\u7ba1\u7406\uff1a \/root\/lnmp {start|stop|reload|restart|kill|status}<br \/>\nNginx\u72b6\u6001\u7ba1\u7406\uff1a\/etc\/init.d\/nginx {start|stop|reload|restart}<br \/>\nPHP-FPM\u72b6\u6001\u7ba1\u7406\uff1a\/etc\/init.d\/php-fpm {start|stop|quit|restart|reload|logrotate}<br \/>\nPureFTPd\u72b6\u6001\u7ba1\u7406\uff1a \/etc\/init.d\/pureftpd {start|stop|restart|kill|status}<br \/>\nMySQL\u72b6\u6001\u7ba1\u7406\uff1a\/etc\/init.d\/mysql {start|stop|restart|reload|force-reload|status}<br \/>\nMemcached\u72b6\u6001\u7ba1\u7406\uff1a\/etc\/init.d\/memcached {start|stop|restart}<br \/>\n\u76f8\u5173\u56fe\u5f62\u754c\u9762\u7a0b\u5e8f<\/p>\n<p>phpinfo : http:\/\/\u524d\u9762\u8f93\u5165\u7684\u57df\u540d\u6216IP\/phpinfo.php<br \/>\nphpMyAdmin : http:\/\/\u524d\u9762\u8f93\u5165\u7684\u57df\u540d\u6216IP\/phpmyadmin\/<br \/>\n\u63a2\u9488 : http:\/\/\u524d\u9762\u8f93\u5165\u7684\u57df\u540d\u6216IP\/p.php<br \/>\nPureFTP\u7ba1\u7406\u754c\u9762\uff1ahttp:\/\/\u524d\u9762\u8f93\u5165\u7684\u57df\u540d\u6216IP\/ftp\/<br \/>\nMemcached\u6d4b\u8bd5\u9875\u9762\uff1ahttp:\/\/\u524d\u9762\u8f93\u5165\u7684\u57df\u540d\u6216IP\/memcached.php<br \/>\nLNMP\u76f8\u5173\u76ee\u5f55<\/p>\n<p>nginx : \/usr\/local\/nginx<br \/>\nmysql : \/usr\/local\/mysql<br \/>\nphp : \/usr\/local\/php<br \/>\n\u7f51\u7ad9\u76ee\u5f55: \/home\/wwwroot\/<br \/>\nNginx\u65e5\u5fd7\u76ee\u5f55\uff1a\/home\/wwwlogs\/<br \/>\n\/root\/vhost.sh\u6dfb\u52a0\u7684\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff1a\/usr\/local\/nginx\/conf\/vhost\/<br \/>\nLNMP\u76f8\u5173\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>Nginx\u4e3b\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/nginx\/conf\/nginx.conf<br \/>\n\/root\/vhost.sh\u6dfb\u52a0\u7684\u865a\u62df\u4e3b\u673a\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/nginx\/conf\/vhost\/\u57df\u540d.conf<br \/>\nMySQL\u914d\u7f6e\u6587\u4ef6\uff1a\/etc\/my.cnf<br \/>\nPHP\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/php\/etc\/php.ini<br \/>\nphp-fpm\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/php\/etc\/php-fpm.conf<br \/>\nPureFtpd\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/pureftpd\/pure-ftpd.conf<br \/>\nPureFtpd MySQL\u914d\u7f6e\u6587\u4ef6\uff1a\/usr\/local\/pureftpd\/pureftpd-mysql.conf<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5728security groups\u68c0\u67e5Inbound\u662f\u5426\u5f00\u542f\u4ee5\u4e0b\u4e24\u4e2a\u7aef\u53e3\uff0c\u5c24\u517680\u7aef\u53e3\uff0c\u5426\u5219web\u65e0\u6cd5\u8bbf\u95ee\u3002<\/p>\n<p>&nbsp;<\/p>\n<div style=\"position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;\"><\/div>\n<table class=\"GAR5EH-MD\" style=\"width: 100%;\">\n<thead class=\"GAR5EH-DD\">\n<tr>\n<th style=\"width: 25%;\">\n<div>Type<\/div>\n<\/th>\n<th style=\"width: 25%;\">\n<div>Protocol<\/div>\n<\/th>\n<th style=\"width: 25%;\">\n<div>Port Range<\/div>\n<\/th>\n<th style=\"width: 25%;\">\n<div>Source<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tfoot>\n<tr>\n<td colspan=\"5\"><\/td>\n<\/tr>\n<\/tfoot>\n<tbody>\n<tr>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">SSH<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">TCP<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">22<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">0.0.0.0\/0<\/div>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">HTTP<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">TCP<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">80<\/div>\n<\/div>\n<\/div>\n<\/td>\n<td class=\"GAR5EH-A5\">\n<div>\n<div>\n<div class=\"GAR5EH-MLE\">0.0.0.0\/0<\/div>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>1.\u767b\u5f55\u540e\u8fdb\u5165https:\/\/console.aws.amazon.com\/console\/home?regi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1073","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1073"}],"version-history":[{"count":0,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1073\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1073"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}