How to install PHP on Linux Mint 18

install php on linux mint 18

Linux Mint Tutorial – Hello everyone, today I am going to show you how to install PHP on Linux Mint 18. PHP is an integral part of LAMP (Linux Apache MySQL and PHP) server. If you are going to build a powerful web server, PHP is one of the important part of it.

Steps to install PHP on Linux Mint 18

Step 1. Update System

sudo apt-get update && sudo apt-get upgrade

Step 2. Install PHP

First we need to install PHP and some other packages.

dhani@dhani-Mint ~ $ sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi  php7.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php-common php7.0-cli php7.0-common php7.0-opcache php7.0-readline
Suggested packages:
The following NEW packages will be installed:
  php-common php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-json php7.0-mysql php7.0-opcache php7.0-readline
0 upgraded, 10 newly installed, 0 to remove and 174 not upgraded.
Need to get 3.636 kB of archives.
After this operation, 18,9 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Check php version

dhani@dhani-Mint ~ $ php -v
PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies


1 Comment

Leave a Reply