Wednesday, September 14, 2011

Installing LAMP on Ubuntu 11.0

LAMP (Linux Apache Mysql and Php) is one of the most popular web component for a web server.
In this tutorial we will learn to install LAMP on ubuntu server(most popular server for web hosting).

1.Install Apache Web server.
  apt-get install apache2
  now test it on your browser by typing http://localhost or http://ip-address

2.Install Mysql server
  apt-get mysql-server mysql-client
  Upon installing you have to provide the root password.

3.Install PHP
  install php5 libapache2-mod-php5

4.Now Restart Apache
 /etc/init.d/apache2 restart

5.Make Apache and Mysql start on boot
  i.chkconfig --level 235 mysql on
  ii.chkconfig --level 235 apache2 on

6.Now test for Php installation.
 i.create a file called info.php on /var/www
 vi /var/www/info.php

copy the following lines.
<?php
phpinfo();
?>

ii.Open your browser and type http://localhost/info.php
 it should shows the information of installed php installaion

No comments:

Post a Comment