In this screencast you will learn how to use Amazon EC2 (Elastic cloud compute). We will install a debian instance, connect to it with SSH and install our LAMP stack.

Amazon ec2 instance id used: ami-b26c9fdb

Software installed for lamp stack:

#apt-get update

#apt-get install mysql-server mysql-client libmysqlclient15-dev

#apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

#apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-mcrypt php5-mysql php5-ps php5-pspell php5-recode php5-xsl

#apt-get install phpmyadmin

16 responses to “Creating An Amazon EC2 Instance With Linux Lamp Stack”

  1. Drake says:

    This was a great tutorial. This was my third time trying to get an EC2 instance up and only my first successful attempt. Seems like it wouldn’t be that hard but with the plethora of AMI’s it just isn’t that straight forward for a n00b like myself.

    Now if you can show me how to EASILY create an FTP connection…

  2. anthony says:

    I’d be happy to create a tut for you if you would like. I’ll try and do that tonight.

  3. anthony says:

    Also, so you know if you just instal openssh-server and adduser. You can connect to sftp with filezilla. Just use your host name, the username and password, and port 22

    • Drake says:

      Funny I actually was able to get in using FileZilla/SFTP using the converted keypair as root. I would like to know how to create users/passwords however so that others could connect via port 21.

      I do have a question. After following all the steps above I am able to view the index.php page fine but when I try to access phpmyadmin I get a 404. I tried finding phpmyadmin setting info but the articles I’ve found don’t seem to relate to this install. What am I doing wrong?

  4. anthony says:

    Do you have a /etc/phpmyadmin? If not, you might try re-doing the apt-get install phpmyadmin

    Make sure you’ve done apt-get update as well.

    I’m working on a screencast for this evening that will show you how to create username/passwords for others to connect to your box with.

    • Drake says:

      It looks like the issue was that the phpmyadmin apache alias isn’t being auto-created. I was able to create it in the sites-enabled folder and now it works. Looking forward to the new tut!

  5. Trevor says:

    FYI on this image you’ll probably need to follow the post below to successfully run an apt-get upgrade:

  6. […] use our Linux Amazon EC2 instance to connect to the MySQL database. Series: How To use Amazon S3 Creating An Amazon EC2 Instance With Linux Lamp Stack Creating An Amazon EC2 […]

  7. […] Related Screencasts: Creating An Amazon EC2 Instance With Linux Lamp Stack […]

  8. jaffe says:

    And for you Windows users you can get win-get here

  9. andrewpsp says:

    Can’t help but notice you went at blazing speed during the creation of the index.php file
    I create the index.php file just as you did.

    Looking so clean so far, now I ^X and hit Y to write the changes using nano(new)

    What did you do afterwards to call the details at 10:42?

  10. Rob says:

    Total Linux noob here. When I searched for the AMI ami-b26c9fdb it doesn’t show up in the list of available AMIs. Is it just out of date and removed from the list?

    For a basic LAMP stack, which AMI should I use? How do decide which AMI is best if I am just starting out with Linux? I’m not sure what features or platform I should look for. Debian, Ubuntu, Red Hat? There are so many AMIs to choose from and I don’t know what to look for.

  11. Brandon says:

    I’m using a linux server and the apt-get is not working to install apache.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get actionable training and tech advice

We'll email you our latest articles up to once per week.