如何在 Amazon EC2 上上传 Web 应用程序?

发布于 2024-10-11 16:01:28 字数 231 浏览 2 评论 0原文

您能告诉我有关 Amazon EC2 的信息吗?我正在本地完成一个功能齐全的小型 Web 应用程序(大约 20-25 页)。但现在业主希望将其上传到云端而不是简单的服务器上。

所以请告诉我,我应该对我的应用程序进行任何更改吗?是否需要使用亚马逊云上的PHP SDK。管理云上的实例具体需要哪些步骤?

请向我提供一些链接,我可以从中获取有关此内容的详细信息。

我的应用程序使用 PHP 和 MySQL。

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.

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?

Please provide me some link from where I can get details about this.

I am having my application in PHP and MySQL.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请你别敷衍 2024-10-18 16:01:28

Amazon EC2 是 Amazon 的弹性计算云。 EC2 是一个在云中托管专用服务器的平台。这与平台即服务模型不同,例如 Google App Engine,您绝对需要使用他们的 SDK。

例如,如果您的本地服务器运行 SUSE,并且 EC2 服务器运行 SUSE,那么理论上您的应用程序应该在两台服务器上运行相同的运行方式。您应该能够通过 SSH 连接访问 EC2 服务器,就像访问本地服务器一样。您应该能够使用安全复制 (scp) 来复制应用程序。

此外,假设他们运行 SUSE,您需要确保 Apache 配置为运行 PHP 脚本,并且您需要安装和配置 MySQL,就像在本地服务器上一样。

您的应用程序应该可以在亚马逊上正常运行。您仍在使用专用服务器。主要区别在于你无法实际触摸它,因为我认为它位于弗吉尼亚州的某个地方。

话虽如此,亚马逊有一个 PHP SDK,但目前还不清楚它的用途。我在没有 SDK 的情况下在 EC2 上运行 PHP 得很好。但如果您有兴趣,链接如下:

http://aws.amazon.com/sdkforphp/

编辑

PHP API 的主要优点是适用于应用程序与 Amazon 服务集成的情况。举个例子,假设您的应用程序将文件保存到 Amazon S3。 S3 使用 REST 接口与 S3 云上的资源进行交互。 PHP API 包含一些预先打包的 API,可以加快开发速度,而不是您自己编写 REST 接口的包装器。

您可以通过Amazon PHP SDK 常见问题解答了解更多信息

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.

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).

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.

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:

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.

You can learn more here at the Amazon PHP SDK FAQ

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文