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 : https://wiki.apache.org/httpd/DistrosDefaultLayout 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 : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-vi...

References :

1. www.linode.com

2. www.digitalocean.com

3. www.apache.org

4. http://httpd.apache.org/docs/2.2/vhosts/name-based.html 5

. https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-vi...

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Moments