Validation bootstrap.sh
This commit is contained in:
parent
98c5ee275c
commit
f7faea32ef
@ -52,43 +52,43 @@ else
|
||||
fi
|
||||
|
||||
# --- PHP
|
||||
if [ ! -f /usr/bin/php5 ]; then
|
||||
if [ ! -f /usr/bin/php ]; then
|
||||
# Install
|
||||
sudo apt-get update
|
||||
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
|
||||
sudo apt-get -y install htop unzip apache2 php7.0-fpm php7.0-cli php-apcu php7.0-curl php7.0-xmlrpc php7.0-xsl php7.0-mysql
|
||||
if [ $VARGANTDEV -eq 1 ]; then
|
||||
sudo apt-get -y install php-xdebug
|
||||
fi
|
||||
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
|
||||
sudo a2enconf phpfcgi
|
||||
|
||||
# --- Configuration PHP / CLI
|
||||
if [ -f /etc/php/7.0/cli/php.ini ]; then
|
||||
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
|
||||
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php/7.0/cli/php.ini
|
||||
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php/7.0/cli/php.ini
|
||||
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php/7.0/cli/php.ini
|
||||
fi
|
||||
|
||||
# --- Configuration PHP FPM
|
||||
if [ -f /etc/php/7.0/fpm/php.ini ]; then
|
||||
sudo sed -i -e 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php/7.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/short_open_tag = Off/short_open_tag = On/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/;mbstring.internal_encoding = UTF-8/mbstring.internal_encoding = UTF-8/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php:7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php/7.0/mods-available/xdebug.ini
|
||||
|
||||
# --- Browscap
|
||||
sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php/7.0/fpm/
|
||||
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/fpm\/php_browscap.ini/g' /etc/php/7.0/fpm/php.ini
|
||||
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php\/7.0\/fpm\/php_browscap.ini/g' /etc/php/7.0/fpm/php.ini
|
||||
fi
|
||||
|
||||
# --- ChartDirector
|
||||
if [ ! -f /usr/lib/php5/20121212/chartdir.lic ]; then
|
||||
#if [ ! -f /usr/lib/php5/20121212/chartdir.lic ]; then
|
||||
#sudo cp -R $DIRDATA/ChartDirector/lib/fonts /usr/lib/php5/20121212/
|
||||
#sudo chown -R 777 /usr/lib/php5/20121212/fonts
|
||||
#sudo cp $DIRDATA/ChartDirector/lib/libchartdir.so /usr/lib/php5/20121212/
|
||||
@ -96,8 +96,8 @@ if [ ! -f /usr/bin/php5 ]; then
|
||||
#sudo cp $DIRDATA/ChartDirector/chartdir.lic /usr/lib/php5/20121212/
|
||||
#sudo cp $DIRDATA/ChartDirector/chartdir.ini /etc/php5/mods-available/
|
||||
#sudo php5enmod chartdir
|
||||
fi
|
||||
|
||||
#fi
|
||||
sudo usermod -a -G www-data $(whoami)
|
||||
fi
|
||||
|
||||
# --- Composer
|
||||
@ -160,7 +160,7 @@ for f in *.conf; do
|
||||
continue
|
||||
fi
|
||||
if [ -f $f ]; then
|
||||
sudo cp -vf $f /etc/apache2/sites-available/;
|
||||
sudo cp -vf $f /etc/apache2/sites-available/
|
||||
VHOSTS+=" $f"
|
||||
fi
|
||||
done;
|
||||
@ -170,4 +170,3 @@ sudo a2ensite $VHOSTS
|
||||
# --- Restart apache
|
||||
sudo service apache2 restart
|
||||
|
||||
sudo usermod -a -G www-data vagrant
|
||||
|
@ -10,7 +10,7 @@
|
||||
# SetHandler "proxy:fcgi://localhost/:9000"
|
||||
# If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket
|
||||
# SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/"
|
||||
SetHandler "proxy:unix:/var/run/php7.0-fpm.sock|fcgi://localhost/"
|
||||
SetHandler "proxy:unix:/var/run/php/php7.0-fpm.sock|fcgi://localhost/"
|
||||
</FilesMatch>
|
||||
# Définition d'une configuration de mandataire qui convient.
|
||||
# La partie qui est mise en correspondance avec la valeur de SetHandler est la partie qui suit
|
||||
|
Loading…
Reference in New Issue
Block a user