Making Ubuntu 16.10 to work with php7

Installer is tested
This commit is contained in:
dpeca 2017-02-17 16:19:22 +01:00 committed by GitHub
commit 9c84c5f9fe

View file

@ -30,14 +30,11 @@ if [ "$release" = '16.04' ]; then
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
bsdmainutils cron vesta vesta-nginx vesta-php expect"
elif [ "$release" = '16.10' ]; then
echo "deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse" >> /etc/apt/sources.list
apt-get update
software="nginx apache2 apache2-utils apache2.2-common
apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
libapache2-mod-fcgid libapache2-mod-php5 php5 php5-common php5-cgi
php5-mysql php5-curl php5-fpm php5-pgsql awstats webalizer vsftpd
libapache2-mod-fcgid libapache2-mod-php php php-common php-cgi
php-mysql php-curl php-fpm php-pgsql awstats webalizer vsftpd
proftpd-basic bind9 exim4 exim4-daemon-heavy clamav-daemon
spamassassin dovecot-imapd dovecot-pop3d roundcube-core
roundcube-mysql roundcube-plugins mysql-server mysql-common
@ -478,6 +475,7 @@ rm -f /etc/apache2/conf.d/* > /dev/null 2>&1
# Backing up PHP configuration
service php7.0-fpm stop > /dev/null 2>&1
service php5-fpm stop > /dev/null 2>&1
cp -r /etc/php7/* $vst_backups/php/ > /dev/null 2>&1
cp -r /etc/php5/* $vst_backups/php/ > /dev/null 2>&1
cp -r /etc/php/* $vst_backups/php/ > /dev/null 2>&1
@ -551,10 +549,12 @@ if [ "$apache" = 'no' ]; then
software=$(echo "$software" | sed -e "s/libapache2-mod-ruid2//")
software=$(echo "$software" | sed -e "s/libapache2-mod-rpaf//")
software=$(echo "$software" | sed -e "s/libapache2-mod-fcgid//")
software=$(echo "$software" | sed -e "s/libapache2-mod-php7//")
software=$(echo "$software" | sed -e "s/libapache2-mod-php5//")
software=$(echo "$software" | sed -e "s/libapache2-mod-php//")
fi
if [ "$phpfpm" = 'no' ]; then
software=$(echo "$software" | sed -e "s/php7-fpm//")
software=$(echo "$software" | sed -e "s/php5-fpm//")
software=$(echo "$software" | sed -e "s/php-fpm//")
fi
@ -590,14 +590,16 @@ if [ "$mysql" = 'no' ]; then
software=$(echo "$software" | sed -e 's/mysql-server//')
software=$(echo "$software" | sed -e 's/mysql-client//')
software=$(echo "$software" | sed -e 's/mysql-common//')
software=$(echo "$software" | sed -e 's/php7-mysql//')
software=$(echo "$software" | sed -e 's/php5-mysql//')
software=$(echo "$software" | sed -e 's/phpMyAdmin//')
software=$(echo "$software" | sed -e 's/php-mysql//')
software=$(echo "$software" | sed -e 's/phpMyAdmin//')
software=$(echo "$software" | sed -e 's/phpmyadmin//')
fi
if [ "$postgresql" = 'no' ]; then
software=$(echo "$software" | sed -e 's/postgresql-contrib//')
software=$(echo "$software" | sed -e 's/postgresql//')
software=$(echo "$software" | sed -e 's/php7-pgsql//')
software=$(echo "$software" | sed -e 's/php5-pgsql//')
software=$(echo "$software" | sed -e 's/php-pgsql//')
software=$(echo "$software" | sed -e 's/phppgadmin//')
@ -1128,6 +1130,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
fi
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
php7enmod mcrypt 2>/dev/null
php5enmod mcrypt 2>/dev/null
phpenmod mcrypt 2>/dev/null
service apache2 restart