LAMP is short for Linux, Apache, MySQL, PHP. In this tutorial i’ll shows you how can you install an Apache2 webserver on an Ubuntu 10.04 server with PHP5 support (mod_php) and MySQL support.
I do not issue any guarantee that this will work for you!
FIRST NOTE
In this tutorial I’m using test.localserver.com and ip address is 192.168.1.11. These settings maybe different on your side. So, take care of them and change them where needed.
Let’s start now, first make yourself root to prevent typing password again and again.
sudo su
MySQL Server
First I am going to install MySQL. Follow these steps,
aptitude install mysql-server mysql-client
You will be asked for root password. Set the password for root user of MySQL as you want. Don’t bypass it. Otherwise we need to change it later on manually.
Webserver, Apache2
Apache2 is available as package in Ubuntu sources. So, we can install Apache2 server with following command.
aptitude install apache2
After completing wizard open up your browser and type following address. http://localhost/ it will show apache test page with word, It Works!
Apache’s default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the /etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d.
PHP5
Let’s install php5 and php5 apache modules.
aptitude install php5 libapache2-mod-php5
Now restart apache to apply the changes
/etc/init.d/apache2 restart
Now we must test php. Create a test file.
nano /var/www/test.php
Now type the following code in it
<?phpphpinfo();?>
Now open your browser and type following address. http://localhost/test.php. It will show php information page.
Let’s add MySQL support in apache2. Type following command.
aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
Now restart the apache,
/etc/init.d/apache2 restart
phpMyAdmin
Now install phpmyadmin for gui database administration.
aptitude install phpmyadmin
The wizard will ask which webserver will automatically configured. Select apache2 here and when it will ask about creating common config database then select NO.
That’s It.
If you are looking for LAMP installation on Fedora / RHEL / CentOS then follow this link.






Sound good. Its also my favorite topic.That’s great andthanks for the fine sharring.
Thank you for that informative post. I really love to read articles that have good information and ideas to share to each reader. I hope to read more from you guys and continue that good work that is really inspiring to us.
Hello, Good morning cos I totally like your fine blog, I wuold be glad if you allow me to post a review on your wordpress blog in this little would you grant me permission? Stock Market Forum is my main interest.