PHP5 and Apache are two of the most popular web server software programs on Ubuntu. They both offer a lot of features and can be used to run many different types of websites. If you’re new to Ubuntu, it’s a good idea to install PHP5 and Apache on your system before starting any other projects. This way, you’ll have them both installed and ready to go when you need them. To install PHP5 and Apache on Ubuntu, follow these steps:

  1. Open a terminal window and type the following command: sudo apt-get update sudo apt-get install php5 php5-cli php5-fpm apache2

First, you’ll want to add the extra repositories to Ubuntu’s sources.list file.

From a command shell, you will run the following commands:

Note that if apache is already installed you can omit the first line. Your web files will now be found in /var/www/

sudo apt-get install php5

sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart