Created
October 25, 2021 17:20
-
-
Save parallaxhub/bb7f56c2af328a21fac28637ba8ad305 to your computer and use it in GitHub Desktop.
Install Different PHP Version and Switch PHP Version
This file contains hidden or 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
#!/bin/bash | |
# Installing PHP Versions 7.2 and 7.3 with PHP-FPM | |
sudo apt-get install software-properties-common -y | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update -y | |
sudo apt-get install php7.2 php7.2-fpm php7.2- libapache2-mod-php7.2 libapache2-mod-fcgid -y | |
sudo apt-get install php7.3 php7.3-fpm php7.3- libapache2-mod-php7.3 -y | |
sudo systemctl start php7.2-fpm | |
sudo systemctl status php7.2-fpm | |
sudo systemctl start php7.3-fpm | |
sudo systemctl status php7.3-fpm | |
# SWITCH PHP VERSION | |
update-alternatives --config php | |
# Configure PHP.INI | |
nano /etc/php/7.3/apache2/php.ini | |
file_uploads = On | |
allow_url_fopen = On | |
short_open_tag = On | |
memory_limit = 1024M | |
upload_max_filesize = 1024M | |
max_execution_time = 3600 | |
date.timezone = UTC+6 | |
# ctrl+s and ctrl+x | |
apt update -y | |
apt upgrade -y | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment