Install Apache and PHP5 in Ubunutu Linux

Install Apache and PHP5 in Linux, If you are doing any development on PHP, then you need a PHP development environment in Linux with apache and php. Here I’ll show you process to install Apache, PHP5 and where to find configuration files, where to place your website files. Here I’m doing this Ubuntu Linux, before starting installation you need to update package lists from the repositories, then download them.

Install Apache and PHP5 in Linux

For updating packages list from the repositories and upgrading.

sudo apt-get update
sudo apt-get upgrade

It will takes few minutes to complete above action based on your internet connection speed.

1. Install Apache

For installing apache just use this command.

sudo apt-get install apache2

2. Install PHP

For installing PHP use this command in Linux terminal.

sudo apt-get install php5

Then create a connection between Apache & PHP, for that use this coommands.

sudo apt-get install libapache2-mod-php5

Then restart server for making any changes.

sudo /etc/init.d/apache2 restart

php.ini path in Linux Ubuntu – /etc/php5/apache2/php.ini

httpd.conf path in Linux Ubuntu – /etc/apache2/apache2.conf

Put your website files in – /var/www/

If you want to install PHP development environment as single installation then read this -> Installing Lamp on Linux Mint but you can install it on any linux distribution.

Check Your Website Rankings

Vivek Vengala

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: