Skip to content

Instantly share code, notes, and snippets.

@lnrsoft
Created November 18, 2018 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnrsoft/822f09d1a333db206a7fd425bcca982f to your computer and use it in GitHub Desktop.
Save lnrsoft/822f09d1a333db206a7fd425bcca982f to your computer and use it in GitHub Desktop.
Install or Upgrade to PHP 7.X on Ubuntu
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php7.2
sudo apt-get install php7.2-mysql
sudo apt-get install php7.2-cli php7.2-common libapache2-mod-php7.2 php7.2 php7.2-mysql php7.2-fpm
sudo apt-get install php7.2-mbstring
sudo a2dismod php5
sudo a2enmod php7.2
sudo service apache2 restart
sudo apt purge php5*
@lnrsoft
Copy link
Author

lnrsoft commented Nov 18, 2018

Creating config file /etc/php/7.2/fpm/php.ini with new version
NOTICE: Not enabling PHP 7.2 FPM by default.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Created symlink /etc/systemd/system/multi-user.target.wants/php7.2-fpm.service → /lib/systemd/system/php7.2-fpm.service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment