diff --git a/multiphp.sh b/multiphp.sh new file mode 100644 index 0000000..1a82633 --- /dev/null +++ b/multiphp.sh @@ -0,0 +1,11 @@ +#/bin/bash +echo "getting remove repo for several php versions" +sudo apt install python-software-properties -y +sudo add-apt-repository ppa:ondrej/php -y +sudo apt update -y +echo "installing php from 5.6 to 7.3" +apt install php5.6 php7.0 php7.1 php7.2 php7.3 php*common php*-gd php*sql php*-dom php*-cli php*-json php*-common php*-mbstring php*-opcache php*-readline php*xml php*soap php*curl php*hash php*mime php*iconv php*ftp php*apc php*mysqli php*dom php*dbg php*soap php*snmp php*xdebug php*odbc php*mbstring php*db php*geoip php*intl php*interbase php*pdo php*fpm php*imagick php*exif php*ssh2 php*msgpack php*cgi php*bz2 php*redis php*zip php*pear php*imap php*pspell php*filter -y + +echo "enabling modules" +# get modules from php7.2 +phpenmod $((ls /etc/php/7.2/mods-available | rev | cut -c5- | rev) | tail -n +1 | sed -z 's/\n/ /g')