How To Install php7.1 On Ubuntu 18.04
In this tutorial how to install php7.1 Ubuntu 18.04 server. Many time and many link sometime not working, so I will provide small tips for all tech tutorials. Now start this guide for ubuntu 18.04 server.
- How To Change MySQL Root Password Using Terminal Ubuntu Server
- How To Setup Permanent DNS Nameservers on Ubuntu 19.04
Step #01: Must be server update and upgrade complete.
[email protected]~:# apt update && apt upgrade -y
Update php repo list using below command.
[email protected]~:# apt -y install software-properties-common [email protected]~:# add-apt-repository ppa:ondrej/php [email protected]~:# apt-get update
Step #02: Install php 7.1 version on Ubuntu 18.04.
[email protected]~:# apt -y install php7.1 [email protected]~:# apt -y install apache2 php-pear php7.1-curl php7.1-dev php7.1-gd php7.1-mbstring php7.1-zip php7.1-mysql php7.1-xml php7.1-fpm libapache2-mod-php7.1 php7.1-imagick php7.1-recode php7.1-tidy php7.1-xmlrpc php7.1-intl
Now test php work is properly. So create php info file.
[email protected]~:# nano /var/www/html/phpinfo.php
Insert below code into phpinfo.php file.
<?php phpinfo() ;?>
Then save it and restart web server apache using below command.
[email protected]~:# systemctl restart apache2
Now browse your server ip address and see is working properly.
http://10.66.11.10/phpinfo.php