Can you please tell me about Amazon EC2. I am having a fully functional small web application -- about 20-25 pages -- completed locally. But now the owners want to get it uploaded on the cloud rather than on a simple server.
你能告诉我关于亚马逊EC2的事吗。我正在本地完成一个功能齐全的小型Web应用程序 - 大约20-25页。但现在业主希望将其上传到云上而不是简单的服务器上。
So please tell me, should I make any changes in my app? Is there any need to use the PHP SDK on Amazon Cloud. What steps exactly are required to manage the instance on the cloud?
请告诉我,我的应用程序是否应该进行任何更改?是否需要在Amazon Cloud上使用PHP SDK。在云上管理实例需要哪些步骤?
Please provide me some link from where I can get details about this.
请提供一些链接,我可以从中获取有关此内容的详细信息。
I am having my application in PHP and MySQL.
我正在使用PHP和MySQL的应用程序。
1 个解决方案
#1
7
Amazon EC2 is the Elastic computing cloud by Amazon. EC2 is a platform for hosting dedicated servers in the cloud. This differs from platform as a service models, like Google App Engine, where you definitely need to use their SDK.
Amazon EC2是亚马逊的弹性计算云。 EC2是用于在云中托管专用服务器的平台。这不同于平台作为服务模型,例如Google App Engine,您肯定需要使用他们的SDK。
If your local server is running SUSE, for instance, and the EC2 server is running SUSE, then in theory your app should run the same on both servers. You should be able to access the EC2 server with an SSH connection just like you would a local server. You should be able to copy the app using secure copy (scp).
例如,如果您的本地服务器正在运行SUSE,并且EC2服务器正在运行SUSE,那么理论上您的应用应该在两台服务器上运行相同的服务器。您应该能够像使用本地服务器一样使用SSH连接访问EC2服务器。您应该能够使用安全副本(scp)复制应用程序。
Additionally, assuming they're running SUSE, you'd need to make sure Apache is configured to run PHP scripts, and you would need to install and configure MySQL, just like you would on your local server.
此外,假设他们正在运行SUSE,您需要确保Apache配置为运行PHP脚本,并且您需要安装和配置MySQL,就像在本地服务器上一样。
Your app should run just fine on Amazon. You're still dealing with a dedicated server. The main difference is that you can't physically touch it as it's somewhere in Virginia I think.
您的应用应该在亚马逊上正常运行。您还在处理专用服务器。主要区别在于你无法亲身接触它,因为它在弗吉尼亚州的某个地方我认为。
With that said, there is an SDK for PHP for Amazon, but it's not immediately clear what purpose it serves. I've run PHP just fine on EC2 without an SDK. But if you are interested, the link is below:
有了这个说法,亚马逊有一个适用于PHP的SDK,但它并不能立即明确它的用途。我在没有SDK的情况下在EC2上运行PHP就好了。但如果您有兴趣,链接如下:
http://aws.amazon.com/sdkforphp/
http://aws.amazon.com/sdkforphp/
EDIT:
编辑:
The main advantage of the PHP API is for cases where the application will integrate with Amazon services. As an example, let's say your application will save files to Amazon S3. S3 uses a REST interface to interact with resources on the S3 Cloud. Instead of writing a wrapper around the REST interface yourself, the PHP API includes some pre-packaged API's that make development faster.
PHP API的主要优点是应用程序将与Amazon服务集成的情况。例如,假设您的应用程序将文件保存到Amazon S3。 S3使用REST接口与S3 Cloud上的资源进行交互。 PHP API不是自己编写REST接口的包装器,而是包含一些预先打包的API,使开发更快。
You can learn more here at the Amazon PHP SDK FAQ
您可以在Amazon PHP SDK常见问题解答中了解更多信息
#1
7
Amazon EC2 is the Elastic computing cloud by Amazon. EC2 is a platform for hosting dedicated servers in the cloud. This differs from platform as a service models, like Google App Engine, where you definitely need to use their SDK.
Amazon EC2是亚马逊的弹性计算云。 EC2是用于在云中托管专用服务器的平台。这不同于平台作为服务模型,例如Google App Engine,您肯定需要使用他们的SDK。
If your local server is running SUSE, for instance, and the EC2 server is running SUSE, then in theory your app should run the same on both servers. You should be able to access the EC2 server with an SSH connection just like you would a local server. You should be able to copy the app using secure copy (scp).
例如,如果您的本地服务器正在运行SUSE,并且EC2服务器正在运行SUSE,那么理论上您的应用应该在两台服务器上运行相同的服务器。您应该能够像使用本地服务器一样使用SSH连接访问EC2服务器。您应该能够使用安全副本(scp)复制应用程序。
Additionally, assuming they're running SUSE, you'd need to make sure Apache is configured to run PHP scripts, and you would need to install and configure MySQL, just like you would on your local server.
此外,假设他们正在运行SUSE,您需要确保Apache配置为运行PHP脚本,并且您需要安装和配置MySQL,就像在本地服务器上一样。
Your app should run just fine on Amazon. You're still dealing with a dedicated server. The main difference is that you can't physically touch it as it's somewhere in Virginia I think.
您的应用应该在亚马逊上正常运行。您还在处理专用服务器。主要区别在于你无法亲身接触它,因为它在弗吉尼亚州的某个地方我认为。
With that said, there is an SDK for PHP for Amazon, but it's not immediately clear what purpose it serves. I've run PHP just fine on EC2 without an SDK. But if you are interested, the link is below:
有了这个说法,亚马逊有一个适用于PHP的SDK,但它并不能立即明确它的用途。我在没有SDK的情况下在EC2上运行PHP就好了。但如果您有兴趣,链接如下:
http://aws.amazon.com/sdkforphp/
http://aws.amazon.com/sdkforphp/
EDIT:
编辑:
The main advantage of the PHP API is for cases where the application will integrate with Amazon services. As an example, let's say your application will save files to Amazon S3. S3 uses a REST interface to interact with resources on the S3 Cloud. Instead of writing a wrapper around the REST interface yourself, the PHP API includes some pre-packaged API's that make development faster.
PHP API的主要优点是应用程序将与Amazon服务集成的情况。例如,假设您的应用程序将文件保存到Amazon S3。 S3使用REST接口与S3 Cloud上的资源进行交互。 PHP API不是自己编写REST接口的包装器,而是包含一些预先打包的API,使开发更快。
You can learn more here at the Amazon PHP SDK FAQ
您可以在Amazon PHP SDK常见问题解答中了解更多信息