How To Create A LAMP Setup (Apache2, PHP, MySQL) On CentOS 5.x In An Amazon Linux AMI 32bits Or 64bits
|
Submitted by retros (Contact Author) (Forums) on Fri, 2011-02-04 16:07. :: CentOS | Apache | Virtualization
How To Create A LAMP Setup (Apache2, PHP, MySQL) On CentOS 5.x In An Amazon Linux AMI 32bits Or 64bitsThis tutorial explains how to create a virtual machine with CentOS 5.x on Amazon's Elastic Compute Cloud (Amazon EC2) and how to set up a LAMP system (LAMP stands for "Linux, Apache, MySQL, PHP") in this virtual machine. We use an AMI (Amazon Machine Image) to set this virtual machine up. I assume you have an Amazon EC2 account.
Create An AMI InstanceYou need to go to the EC2 tab and there choose Launch Instance: Then a small window will open and there you need to choose the AMI that you need for your project - in this case Basic 32-bit Amazon linux AMI or the 64-bit version: NOTE: the 64-bit version runs only on micro and large instances, for more information about the features see the Amazon documentation. Then you need to choose the settings in the Amazon wizard. I always use:
Click on the Continue button: Then on the next screen use the default settings and click on the Continue button.Then on the next screen you must choose a key for accessing your AMI; if this is your first AMI in EC2 you need to choose the option: Create new key pair and fill the Enter a name for your key pair input with the name of the key, for example myKey. Then click on Create & Download your Key Pair button, and the browser will download the key file. Note: It's very important to save the file in a secure directory because you will use this key to access your AMI (from now virtual machine). Then you need to select the security groups. This means you need to choose the open ports or the security rules of your virtual machine. By default there is one active and open port; it is port 22 which allows you to access your virtual machine via SSH.
Connecting To Your Virtual Machine Via SSHFor this, I propose the Tunnelier program, because it is easy to use and you have console and SFTP at the same time. I assume that you will connect from a Windows operating system; for other cases I will write the command to connect from your console. The steps for connecting to the virtual machine under Windows are:
In the case you use Linux or Unix as your client system, you can connect using the following command from the command line: ssh -i myKey.pem ec2-user@myPublicIP
|











Recent comments
13 hours 56 min ago
20 hours 37 min ago
1 day 27 min ago
1 day 2 hours ago
1 day 10 hours ago
1 day 19 hours ago
1 day 20 hours ago
2 days 22 min ago
2 days 4 hours ago
2 days 5 hours ago