Friday, February 3, 2012

Installation of LAMP Server on Ubuntu (LINUX APACHE MYSQL PHP on UBUNTU)

If you are PHP developer and working on Linux i.e. Ubuntu Desktop, then you must need to have one LAMP setup on your local machine to develop and test pages before you directly update the pages to real website.

There are different ways to install APACHE, MYSQL and PHP on ubuntu desktop. I will try to mention the easiest one.
Before posting this tutorial, I have tested all these on my machine and all are working perfectly fine.

Firstly the easiest one.
In a single command, you can install Linux Apache Mysql Php stack on your machine. You need to open terminal and have to type the following command:

sudo apt-get install lamp-server^
make sure you are typing the ^ symbol also at the end.
press enter. It will ask for password. Enter your password and it will continue with installation process.

Second way, using tasksel utility.
If you want to have the feeling of ubuntu server style installation, then you should go for using tasksel utility. For this, you have to first install this.

To install tasksel, type:
sudo apt-get install tasksel
and press ENTER. Then provide your password and installation will start.
one installation is finished, now type:
sudo tasksel
and press ENTER.
It will bring up BLUE screen in the terminal with various pre-defined packages of UBUNTU. Just select LAMP SERVER and press SPACE. then press ENTER. It will install the APACHE MYSQL PHP on your machine.

Using tasksel can help you to install or un-install other variants of the server packages very easily. every time you have to type sudo tasksel and you can select the package of your choice.

Third way, little expanded one.
you have to install all three 1.Apache 2. MYSQL 3.PHP, seperately.

To install, type the following:
sudo apt-get install apache2 php5 mysql-server

this command will install all the three packages.

and in the if you wish to work with PHPMYADMIN, then to install, type the following:
sudo apt-get install phpmyadmin
this will install phpmyadmin, web based interface to manage MYSQL Server Databases.

No comments:

Post a Comment