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 http://us.archive.ubuntu.com/ubuntu dapper universe main restricted universe
# deb http://security.ubuntu.com/ubuntu 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.

2 thoughts on “Simple steps to install php5 in ubuntu”

  1. 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”)

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.