Simple steps to install php5 in ubuntu

in Ubuntu / 2 Comments

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.

Discussion 2 Comments

  1. Vishal

    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

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>