Installing LAMP on Ubuntu based systems.

Here’s a tutorial I wrote some time ago, I figured I would share it here as it can still be be relevant.

Initial Setup, Installing PHP MySQL and Apache

First of all, open up terminal and type in

sudo apt-get install apache2 php5 mysql-server php5-mysql libapache2-mod-php5

this should install all of the components required for the basic server itself.

once they have been downloaded you will get the mysql server screen, this is where you enter the password for the root user, so enter this then hit ok. It will then return to terminal after doing a few other things, once your back to something like: [email protected]: ~$ then you know your done, i’d recommend a restart here though it seems to be optional.

Once we’re back up and running, we can check to see if our server is running, simply open the web browser and type in http://localhost/ and if all is well you should see a page saying It Works!

Now the next step that I prefer to do, is to change the owner of www to my own user account, which makes it easier to just drag and drop files etc, so to do this from terminal cd to your www folder (/var/www) by default apache is hosted in a html folder within this so I do sudo chown {username} html followed by sudo chmod 777 html

Installing phpMyAdmin

Download phpMyAdmin, once downloaded, extract the files, and then move them into /var/www/html/phpmyadmin, this will then allow you to access it from http://localhost/phpmyadmin.

One Reply to “Installing LAMP on Ubuntu based systems.”

Leave a Reply

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