Painless LAMP Installation

Nerdy Nathan's picture
lamp-installation.jpg

Installing LAMP (Linux - Apache - MySQL - PHP/Perl/Python) inside a Linux System is a bit hard especially for beginners. Although a lot of good step-by-step tutorials are posted online but the chances are there will always be something missing. Missing components often lead to errors and dependency cross checks, and these type of scenario will really give beginners a headache. Headaches and uncertainty that often lead them to give up developing inside a Linux system where in fact it is supposed to be the right environment for them to give birth to the wonderful ideas they have.

Down to Business
To get rid of this catastrophe especially when installing PHP and MySQL, a very simple solution is given to us. This solution is called Tasksel and to use this tool is so simple. First, you should install tasksel into your system given that you are on Ubuntu 10.04-12.04 or Linux Mint 12-13.

install-tasksel.jpg

Just so you know, tasksel is a tool used to download and install program packages into your system so that you don't have to worry about things you have missed and other dependency errors. Tasksel will do most of the dirty configurations for you. Installation should take a breeze and now you can run tasksel.

run-tasksel.jpg

A simple package control selection setup screen will popup into your terminal. Simply select Lamp Server by hitting the spacebar when you come down to the right selection and then press Enter. During the installation you may be asked to insert the mysql root password.

install-lamp.jpg

After the easy installation, we should check whether PHP is up and running into your system. We will create a file called phpinfo.php inside the default directory for your sites.

create-phpinfo-file.jpg

We then write inside the phpinfo.php file by hitting "I" to insert text and paste the following code below.

type-phpinfo.jpg

Hit Esc (escape) and then type the string ":wq" to save your work. We then need to restart apache server to make things clean.

restart-apache.jpg

After restarting, open up your favorite browser and then type http://localhost/phpinfo.php into the address bar.

check-php.jpg

Now we are assured that PHP is already running into the system. We also need to check whether MySQL was also installed and should have started. To do this, we should simply log into the MySQL console to verify if the MySQL server is running.

check-mysql.jpg

And now you have it fluffy buddies! Very Simple isn't it? You can also install other packages using tasksel. What a wonderful tool to have.

That's all for now. Let's keep our heads stuffed~