Setting up LAMP ( Apache, Mysql, PHP ) server in Debian 6 / Debian family ( Ubuntu too )

If you are a PHP web developer then AMP ( Apache, Mysql, PHP ) server is something you have to set up in any case.

Let’s learn how to set up the LAMP server in Debian 6. When you just have got a debian which is in pristine condition, even the memory footprint will be around 70 MBs.

That’s how Debian is super optimised. So if you are getting yourself a VPS with 512 MB RAM, go for Debian 6 which is pretty decent.

Assuming the fact that you are logged in using super user / root , first command to shoot is:

apt-get install apache2 – this will fetch the apache2 from the repository.

in case you don’t want the version being downloaded and installed, you have to update the repository database so that it includes the latest versions of the packages.

for it, you have to use following commands : apt-get update –  That command will update the database of repository apt-get install update

That command installs the updated software packages by fetching them and installing.

Now, if you want to install php5 and mysql then use following commands : apt-get install php5-mysql apt-get install mysql-server there will be need to install other php libraries as well, for that use following commands : once everything is done, use apt-get install phpmyadmin for easily managing the mysql server in GUI form which makes database administration work easier.

Configuring Apache Configuration file :

Locating the configuration file of Apache is tricky as every version / operating system has got it on different location, so good reference point is : So, now if you are having a VPS and you want to host multiple domains on it, then read following post for learning how to do it. ( It’s called Name-based Virtual Host )

Learn how to host virtual hosts on debian 7 by reading :

References :




4. 5


Leave a Reply

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