Installing PHP5 and Apache Ubuntu 15.04

PHP Apache Ubuntu Installation Libapache2

Introduction

PHP is one of the most popular open source scripting languages that is especially suited for web development and can be embedded into HTML. In this tutorial, we will be installing PHP5 and using Apache server to serve your PHP website.

Install Apache

Apache package is available on Ubuntu apt-get package manager. Run the following commands to install Apache.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2

Install PHP

We can now install PHP and Apache library required for PHP by using the following commands:

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5

Now we have to restart Apache to load PHP. We can restart Apache by running the command below.

sudo service apache2 restart

Now you can place your website files in /var/www/html/ directory and start accessing your website.

    No comments found for this tutorial, be the first to leave a comment!

Tutorial by
MDS

Last updated on
Aug 26, 2015

Share