Simple steps to install php5 in ubuntu

1. Open a terminal box in Ubuntu.
2. Edit /etc/apt/sources.list

Comment out the following two lines. (Add a “#” to the front)

# deb dapper universe main restricted universe
# deb dapper-security universe

3. Run command

sudo apt-get update

4.Run the following commands:

sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

5. Apache installed in var/www folder.

Anil Kumar Panigrahi

With more than 10 years experience in PHP and Founder of Anil Labs, a blog for PHP and related posts. contributed posts regarding CodeIgniter, CakePHP and Learn PHP online ... Contact : [email protected]

You may also like...

2 Responses

  1. Vishal says:

    Hi if i want to install all things like PHP,Mysql as in Windows System then it is just for php then what for Mysql? and can you please demonstrate how can we use mysql connection in ubantu?same as we use in xamp like mysql_connect(“localhost”,”username”,”password”)

  1. March 11, 2013

    […] friends, We have discussed few posts about Ubuntu in earlier like how to install php , google chrome and Curl. Recent days I am again working with UBUNTU system ( 12.04 ). In my new […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.