Install php On Ubuntu 12.10

In this quick and easy post I will show you how to install php on Ubuntu using the apt-get command and then also what to do during installation when you get presented with a few options.

Install php Ubuntu

You will need to open a new terminal window to do this which can be quickly done by pressing CTRL+ALT+T. Then you can run the following command.

sudo apt-get install php

During the installation you might be asked for some information like what type of web server you are running. If you followed the LAMP tutorial on this site then just pick Apache2 and hit enter. It will also ask you if you would like it to configure a database that is required, say yes to make life easier for you.

install php ubuntu Install php On Ubuntu 12.10


After this it will ask you for the databases administrator user password as-well as the password you want to use for php, it will finish installing the rest automatically afterwards.

ubuntu install php Install php On Ubuntu 12.10

After you finished all of this you might have to restart Apache or run the following command to reconfigure php. (It messed up during installation for me this time but never before, I fixed it thanks to this post.)

sudo /etc/init.d/apache2 restart (Restarts Apache)

sudo dpkg-reconfigure php (Reconfigure php like during installation with a few other small settings.)

You should now have php running and be able to access it by either going to http://localhost/php or php. I hope this post has helped you install php on Ubuntu, please don’t forget to share/like/plus-one! Thanks.

Incoming search terms: