How To Set Up A LAMP Stack.

Okay. So you want to set up your own development environment but you have no idea how to do it.

First thing you want to do is you need a server to install your LAMP Stack (Linux, Apache, Mysql and PHP.) I prefer Centos linux, you can get a free tier t.2 micro server from Amazon Web Services for 12 months if you just want to play around with it.

Okay so you have your server either in-house or at AWS.

I am assuming your running Centos or the amazon version of linux.

How to Update your server:

Please note the -y option installs the update without asking you if you’d like to install the update.

    • Connnect to your server
    • You will then issue this command:
      [ec2-user ~]$ sudo yum update -y
    • Your instance is now up to date.

You now have the latest version of everything that comes with the Linux bundle.

This is where I had some trouble, so stay with me.

How to install LAMP on your server:.

    • To install LAMP you are going to issue this command:
      [ec2-user ~]$ sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
    • To start Apache:
      [ec2-user ~]$ sudo service httpd start

You should now be able to go to your public IP address and see the Apache test page.

You have a LAMP stack.

Note: You may have to go a HTTP rule in your security group.


Another Helpful Tip:

The test page is located here /var/www/html

To start your mysql server:
[ec2-user ~]$ sudo service mysqld start

Read carefully in the installation Y is to say Yes N is for No.

This is as far as I will take you.

If you have any questions Email Us!

Feel free to leave comments below as well!

– Liam

Leave a Reply

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