Empty

Total: £0.00

Ubuntu 10.04 LAMP server on Amazon EC2 Quick Start

By marksams, 05/31/2011 - 00:00

Pre-requisites


  • Sign up with Amazon and EC2

Get Started


  • Select your AMI at http://uec-images.ubuntu.com/releases/lucid/release/ and click on the relevent hyperlink to jump straight into the Amazon EC2 console and the instance launch wizard.
  • Follow instructions in the wizard
  • Download your pem file (if this is your first instance)

Manage your Key File/Make compatible with Putty for SSH connection (if this is your first instance)


  • Open puttygen
  • click 'load' and browse to your .pem file (may need to browse for 'all files')
  • click ok when successfully imported
  • update the comment, set a passphrase if you wish (do not do so if you wish to use filezilla to copy files to your server - more about this later) and click 'save private key' to save your key as a ppk file.

    • click ok to the warning if you haven't set a passphrase
  • close puttygen

Configure inbound ports to your instance in the EC2 console


  • Navigate to 'Security Groups', click on your security group and edit the inbound port configuration.
  • Add rules

    • 22 -SSH
    • 80 - HTTP
  • then click 'apply rule changes'

Get instance details for SSH connection


  • Navigate to 'Instances' in the EC2 console, right click on your instance and click 'connect'
  • Note the command line and copy the section root@ec2<...>com to the clipboard

Make the SSH connection


  • open putty
  • paste the address into the host name box and replace 'root' with 'ubuntu'
  • Select Connection -> SSH -> Auth and browse to your ppk file
  • click 'open' to start the connection
  • click yes to add the server's host key to putty's cache
  • enter your passphrase if prompted

Update Ubuntu Package repositories (before you install anything)


  • sudo apt-get update

Install LAMP server software

phpMyAdmin Security (Allow from 127.0.0.1 only - we will use an SSH tunnel to connect)

Copying files to your server with filezilla


  • Enter your server name ec2<...>com in the host box, prefixed with sftp://
  • Set the username to 'ubuntu'
  • Click Edit -> Settings ->Connection -> SFTP
  • Click add keyfile and browse to your ppk file (without passphrase)
  • Click OK to close the dialogue box and then 'Quick Connect'
  • You can now copy files to the ubuntu user home directory

Further information

Tags: 

Comments

By williamvhale on

This blog entry truly caught my eye. All things considered I will buy in. Accordingly I will get more reports on what you need to state. I found your blog utilizing msn. This is a very elegantly composed article.Thank you for sharing that great subject material on your site. I saw it on the web crawlers. I will return again after you post substantially more articles. If it's not too much trouble continue composing as I need to find out additional. Visit it! to get more data >>>>>> Write my Essay