简体   繁体   English

如何将PHP文件放在EC2的Linux AMI上-Dreamweaver / FTP / SSH?

[英]How do I put my PHP files on a Linux AMI on EC2 - dreamweaver / FTP / SSH?

I have launched an EC2 linux instance (a rightscale CentOS v 5.2 i386 image) and want have followed a tutorial ( http://www.ardentsoft.com/blog/2009/3/4/lamp-on-ec2-part-6-configuring-apache.html ) for configuring PHP and Apache. 我已经启动了EC2 linux实例(正确比例的CentOS v 5.2 i386映像),并希望遵循教程( http://www.ardentsoft.com/blog/2009/3/4/lamp-on-ec2-part-6 -configuring-apache.html ),用于配置PHP和Apache。 Now I need to know how to get my PHP files from my dedicated server up to the cloud. 现在,我需要知道如何将专用服务器中的PHP文件上传到云中。 I usually use dreamweaver to edit and FTP files to my dedicated server so if I could carry on using that it would be preferable. 我通常使用Dreamweaver编辑文件并将FTP文件传输到专用服务器,因此,如果可以继续使用它,那将是更好的选择。 I have used Putty to login to my instance and have found some tutorials about SSH tunneling with dreamweaver but don't fully understand this. 我使用Putty登录到我的实例,并找到了一些有关使用Dreamweaver进行SSH隧道传输的教程,但并没有完全理解这一点。

Once I have done this, I want to know how I can package this server image with all my PHP code and have it ready to go at a moments notice, is this bundling? 完成此操作后,我想知道如何使用我的所有PHP代码打包该服务器映像,并准备好立即发出通知,这是捆绑吗? Can i bundle my configured running image as a new image that I can launch and have ready to go? 我可以将配置的运行映像捆绑为可以启动并准备运行的新映像吗?

Many thanks 非常感谢

Yes, this is bundling. 是的,这是捆绑。 You can either use the AWS Manager provided by Amazon or ElasticFox . 您可以使用Amazon或ElasticFox提供的AWS Manager Both will do what you need. 两者都会满足您的需求。

Your basic steps are: 您的基本步骤是:

  1. Create your server instance on EC2 在EC2上创建服务器实例
  2. Upload all code and configure it fully start up and run as you expect. 上传所有代码并对其进行配置,使其完全启动并按预期运行。
    1. If you are running a Windows instance, use Remote Desktop 如果您正在运行Windows实例,请使用远程桌面
    2. If you are running a Linux instance, use ssh/scp 如果您正在运行Linux实例,请使用ssh / scp
  3. Get your server fully running as you want it to operate. 使您的服务器完全运行,只要您要运行即可。
  4. Create a bundle. 创建一个捆绑包。 This "archives" your instance into a Bundle. 这会将您的实例“存档”到捆绑包中。 Once complete (this process can take up to an hour, IIRC), you will have a custom EC2 machine that you can fire up. 完成后(此过程最多可能需要一个小时,IIRC),您将拥有一台可以启动的自定义EC2计算机。 Steps: 脚步:
    1. Create a "bucket" on Amazon S3 to hold your bundle. 在Amazon S3上创建一个“存储桶”以保存您的捆绑软件。 You can do this from the Amazon web site or using ElasticFox 您可以从Amazon网站或使用ElasticFox进行此操作
    2. Using AWS Manager (ElasticFox will be similar), click on Instance Actions and "Bundle Instance". 使用AWS Manager(ElasticFox将与此类似),单击“实例操作”和“捆绑实例”。
    3. You must enter the S3 bucket name (this is typically a lower-case, no space identifier) and your S3 access key. 您必须输入S3存储桶名称(通常是小写字母,没有空格标识符)和S3访问密钥。
  5. Lather, rinse, repeat. 泡沫,冲洗,重复。 I had to bundle multiple times to get the startup working as I expected (so expect multiple attempts). 我不得不捆绑多次才能使启动正常运行(因此,需要多次尝试)。

You can use dreamweaver to connect to it as well with an ftp connection. 您可以使用Dreamweaver通过ftp连接来连接它。

Install vsftpd: http://www.synergycode.com/knowledgebase/blog/item/ftp-server-on-amazon-ec2 安装vsftpd: http : //www.synergycode.com/knowledgebase/blog/item/ftp-server-on-amazon-ec2

Then just connect using an active connection and point to /var/www/html/ with the user as root and the password you have set. 然后只需使用活动连接进行连接,并以root用户和您设置的密码指向/ var / www / html /。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM