diff --git a/lamp-xenial64-fpm/bootstrap.sh b/lamp-xenial64-fpm/bootstrap.sh index b67ef2e..36b51f6 100644 --- a/lamp-xenial64-fpm/bootstrap.sh +++ b/lamp-xenial64-fpm/bootstrap.sh @@ -4,8 +4,8 @@ VARGANTDEV=1 DIR=/vagrant DIRDATA=$DIR/data MYSQL_PASS=scores -MARIADB_VERSION="10.1" -PHPMYADMIN_VERSION="4.6.3" +MARIADB_VERSION="10.1" +PHPMYADMIN_VERSION="4.6.3" # --- Add a file action.upgrade to perfom a system upgrade if [ -f $DIR/action.upgrade ] @@ -61,10 +61,10 @@ if [ ! -f /usr/bin/php5 ] then # Install sudo apt-get update - sudo apt-get -y install htop unzip apache2 php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd + sudo apt-get -y install htop unzip apache2 php7.0-fpm php7.0-cli php7.0-apcu php7.0-curl php7.0-xmlrpc php7.0-xsl php7.0-mysql if [ $VARGANTDEV -eq 1 ] then - sudo apt-get -y install php5-xdebug + sudo apt-get -y install php-xdebug fi sudo a2enmod autoindex deflate expires headers rewrite actions proxy proxy_fcgi sudo cp -f $DIRDATA/Apache/phpfcgi.conf /etc/apache2/conf-available/phpfcgi.conf @@ -73,27 +73,27 @@ then # --- Configuration PHP / CLI if [ -f /etc/php5/cli/php.ini ] then - sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/cli/php.ini - sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php5/cli/php.ini - sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cli/php.ini + sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php7.0/cli/php.ini + sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php7.0/cli/php.ini + sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php7.0/cli/php.ini fi # --- Configuration PHP FPM if [ -f /etc/php5/fpm/php.ini ] then - sudo sed -i -e 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/fpm/php.ini - sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/fpm/php.ini - sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini + sudo sed -i -e 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php7.0/fpm/php.ini + sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php7.0/fpm/php.ini + sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php7.0/mods-available/xdebug.ini # --- Browscap - sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php5/fpm/ - sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/fpm\/php_browscap.ini/g' /etc/php5/fpm/php.ini + sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php7.0/fpm/ + sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/fpm\/php_browscap.ini/g' /etc/php7.0/fpm/php.ini fi # --- ChartDirector @@ -153,8 +153,8 @@ for f in *.conf; do done; # --- phpmyadmin.sd.dev -cp -f $DIRDATA/Apache/phpmyadmin.conf $DIR/vhosts/phpmyadmin.conf -sed -i -e "s/VERSION/$PHPMYADMIN_VERSION/" $DIR/vhosts/phpmyadmin.conf +cp -f $DIRDATA/Apache/phpmyadmin.conf $DIR/vhosts/phpmyadmin.conf +sed -i -e "s/VERSION/$PHPMYADMIN_VERSION/" $DIR/vhosts/phpmyadmin.conf # --- test.sd.dev cp -f $DIRDATA/Apache/test.conf $DIR/vhosts/test.conf