Thursday, December 8, 2011

Installing Apache, MySQL and PHP (LAMP) on Linux Mint 10

Follow the steps below in the order in which they appear:


sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
sudo /etc/init.d/apache2 restart
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart


During the instalation of MySql it will ask for the password of root user.

After these 8 steps we have LAMP installed with the suport for mod_rewrite. in order the mod_rewrite to be functional we need:


sudo gedit /etc/apache2/sites-available/default


Find line:


AllowOverride None


And replace with:

AllowOverride All

AllowOverride directive determines if Apache takes in consideration .htaccess files or just to ignore them.

After that, retstart Apache again in order for Apache to work with the changes we have made.

sudo /etc/init.d/apache2 restart

For phpMyAdmin, type the following line in the Terminal:

sudo apt-get install phpmyadmin

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf . But first type the following command to open up this file:

gksudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf towards the end of the file:


# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/phpmyadmin/apache.conf


Now restart Apache one final time:
sudo /etc/init.d/apache2 restart

No comments:

Post a Comment