Last active
March 9, 2020 08:45
-
-
Save macghriogair/664c9884736ca31ccaa99dce8534170a to your computer and use it in GitHub Desktop.
[Install PHP 7.4 Ubuntu 18.04+] #php-7.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add ppa | |
sudo apt-get update | |
sudo apt -y install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
# Install PHP + extensions | |
apt-get install php-igbinary | |
sudo apt-get install php7.4 php7.4-fpm php7.4-cli | |
sudo apt-get install php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,curl,dom,xml,redis} | |
# Check composer deps in project dir: | |
composer check | |
# Copy config | |
cp /etc/php/7.4/cli/php.ini /etc/php/7.4/cli/php.ini.orig && cp /etc/php/7.2/cli/php.ini /etc/php/7.4/cli/php.ini | |
cp /etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php.ini.orig && cp /etc/php/7.2/fpm/php.ini /etc/php/7.4/fpm/php.ini | |
# Install tideways... | |
sudo apt-get install tideways-php tideways-daemon | |
cp /etc/php/7.2/mods-available/tideways.ini /etc/php/7.4/mods-available/tideways.ini | |
# Disable php7.2-fpm | |
systemctl stop php7.2-fpm | |
systemctl disable php7.2-fpm | |
systemctl start php7.4-fpm | |
systemctl enable php7.4-fpm | |
# Replace php-sock in nginx sites-available! | |
nginx -t | |
systemctl restart nginx | |
# Restart queues | |
supervisorctl restart default-queue-workers:* | |
supervisorctl restart api-queue-workers:* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment