php7.4.sh 632 B

12345678910111213141516
  1. #!/bin/bash
  2. echo -e "\033[35;1mInstalling PHP 7.4 \033[0m"
  3. apt-get -y install lsb-release apt-transport-https ca-certificates
  4. wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  5. echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
  6. apt-get update
  7. apt-get -y install php7.4 php7.4-{fpm,mysql,opcache,curl,mbstring,zip,xml,gd,imagick,apcu}
  8. mv /etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php.ini.back
  9. cp "$_assets"/php7.4-fpm.ini /etc/php/7.4/fpm/php.ini
  10. systemctl enable php7.4-fpm
  11. systemctl start php7.4-fpm
  12. echo -e "\033[92;1mphp7.4-fpm installed\033[O"