Henry's Web Notes

My dev notes about the web

Linux: How To Install Apache And PHP5 In Ubuntu

Saturday, August 8th, 2009

From the command line, 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

And that’s it. Your web server with PHP is ready to go. The default location of the Doument Root can be found in /var/www

If you need a CLI (command-line-interface) for PHP you can run the following command:

sudo apt-get install php5-cli