Installing LAMP and phpMyAdmin on Ubuntu

This is a quick note about how to install LAMP and phpMyAdmin on Ubuntu 10.04.

In terminal,

sudo tasksel install lamp-server

Then follow the installation. It will ask you to enter mysql password.

Then install phpmyadmin

sudo apt-get install phpmyadmin

It will also ask you passwords.

Then open apache2.conf to edit.

sudo gedit /etc/apache2/apache2.conf

Add the following at the end.

# Include phpmyadmin
Include /etc/phpmyadmin/apache.conf

Then restart apache.

sudo /etc/init.d/apache2 restart

Then visit http://localhost/ and http://localhost/phpmyadmin to see them.

Adding mod_rewrite to apache

You may need mod_rewrite to be loaded on apache if you are using .htaccess file in your web development.
Then on your terminal,

cd /etc/apache2/mods-enabled
sudo touch rewrite.load
sudo gedit rewrite.load

Then copy and paste the following and save it.

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Then on your terminal,

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

Then find and change the following line,

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

to

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

And restart apache by this.

sudo /etc/init.d/apache2 restart

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>