How to Install PHP 7.0, Apache 2.4.18, & MySQL 5.7 on Ubuntu 16.04 LTS

Let’s start to install latest php version in latest ubuntu 16.04 LTS…

  • update your repo list with below command

$ sudo apt-get update

  • Install Apache 2.4.18

$ sudo apt-get install apache2

  • Install PHP 7.0

$ sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-json

  • Install MySQL 5.7

$ sudo apt-get install mysql-server

→ Create info.php file at /var/www/html/info.php with your favorite editor and paste below mentioned code in that file and check php7 with apache2 is running.


→ Once finish with info.php open http://localhost/info.php or then you can able to see page like below.

Its done Enjoy !!!! :)

Like what you read? Give Rakesh Chauhan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.