27 April, 2009

Setting up LAMP on ubuntu

As I can remember (though I have a bad memory) I think that I have mentioned that I am an Ubuntu user for at least about 100 times on this blog. To read about why I use Ubuntu please see the posts which I have posted here.

I thought of writing a post to explain how to set up a working LAMP (Linux Apache PHP MySQL) server (I will call it a server ;)) on ubuntu.

And from here onwards I am talking about the terminal, sometimes it may be boring but yet I believe that being simple is very helpful to be flexible.

Okay now the first step must be the install Apache on your Ubuntu installation,

For that you will have to use the apt, paste the following command in your terminal.

sudo apt-get install apache2

okay here you installed Apache on your computer.

now what? PHP I think

run the following commands in your terminal one after the other.

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5


these will install php and the mod_php for Apache,

then restart your webserver, use the following command,

sudo /etc/init.d/apache2 restart

Now you have installed PHP and Apache, okay lets do install MySQL use the following command to do it.

sudo apt-get install mysql
sudo apt-get install php5-mysql


now again restart your webserver and all wil run good.

is this post useful? any comments highly appreciated.

No comments: