Set xenial virtual machine following the change of trusty
This commit is contained in:
parent
4191d5d89c
commit
9afc3fa339
@ -187,4 +187,3 @@ sudo a2ensite $VHOSTS
|
||||
|
||||
# --- Restart apache
|
||||
sudo service apache2 restart
|
||||
|
||||
|
@ -5,7 +5,7 @@ DIR=/vagrant
|
||||
DIRDATA=$DIR/data
|
||||
MYSQL_PASS=scores
|
||||
MARIADB_VERSION="10.1"
|
||||
PHPMYADMIN_VERSION="4.6.1"
|
||||
PHPMYADMIN_VERSION="4.6.3"
|
||||
|
||||
# --- Add a file action.upgrade to perfom a system upgrade
|
||||
if [ -f $DIR/action.upgrade ]
|
||||
@ -18,9 +18,10 @@ fi
|
||||
# --- Installation Wkhtmltopdf
|
||||
if [ ! -f /usr/local/bin/wkhtmltopdf ]
|
||||
then
|
||||
|
||||
sudo dpkg -i $DIRDATA/Apps/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
|
||||
sudo apt-get -f install -y
|
||||
wget -q http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
||||
tar xJf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
||||
cp -R wkhtmltox/* /usr/local/
|
||||
rm -rf wkhtmltox*
|
||||
fi
|
||||
|
||||
# --- Database
|
||||
@ -30,10 +31,8 @@ then
|
||||
if [ ! -f /etc/mysql/vagrant ]
|
||||
then
|
||||
sudo apt-get install software-properties-common
|
||||
|
||||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
|
||||
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.igh.cnrs.fr/pub/mariadb/repo/10.1/ubuntu xenial main'
|
||||
|
||||
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.igh.cnrs.fr/pub/mariadb/repo/10.1/ubuntu xenial main'
|
||||
sudo apt-get update
|
||||
sudo debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password password $MYSQL_PASS"
|
||||
sudo debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password_again password $MYSQL_PASS"
|
||||
@ -60,15 +59,16 @@ fi
|
||||
# --- PHP
|
||||
if [ ! -f /usr/bin/php5 ]
|
||||
then
|
||||
|
||||
# Install
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install htop unzip apache2 libapache2-mod-fastcgi php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
|
||||
sudo apt-get -y install htop unzip apache2 php5-fpm php5-cli php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
|
||||
if [ $VARGANTDEV -eq 1 ]
|
||||
then
|
||||
sudo apt-get -y install php5-xdebug
|
||||
fi
|
||||
sudo a2enmod autoindex deflate expires headers rewrite actions
|
||||
sudo cp -f $DIRDATA/Apache/fastcgi.conf /etc/apache2/mods-available/fastcgi.conf
|
||||
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/php5/cli/php.ini ]
|
||||
@ -128,7 +128,7 @@ then
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
|
||||
sudo service mysql restart
|
||||
cp $DIRDATA/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_DIR/
|
||||
chmod 0444 /home/vhosts/$PHPMYADMIN_DIR/config.inc.php
|
||||
chmod 0644 /home/vhosts/$PHPMYADMIN_DIR/config.inc.php
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -184,4 +184,3 @@ sudo a2ensite $VHOSTS
|
||||
|
||||
# --- Restart apache
|
||||
sudo service apache2 restart
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
<IfModule mod_fastcgi.c>
|
||||
AddType application/x-httpd-fastphp5 .php
|
||||
Action application/x-httpd-fastphp5 /php5-fcgi
|
||||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 310
|
||||
<Directory /usr/lib/cgi-bin>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</IfModule>
|
18
lamp-xenial64-fpm/data/Apache/phpfcgi.conf
Normal file
18
lamp-xenial64-fpm/data/Apache/phpfcgi.conf
Normal file
@ -0,0 +1,18 @@
|
||||
<FilesMatch "\.php$">
|
||||
# Pick one of the following approaches
|
||||
# Use the standard TCP socket
|
||||
# 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/"
|
||||
</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
|
||||
# le "pipe". Si vous devez faire une distinction, "localhost" peut être changé en un nom de
|
||||
# serveur unique.
|
||||
#<Proxy "fcgi://localhost/" enablereuse=on max=10>
|
||||
#</Proxy>
|
||||
|
||||
# Add Authorization Header
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
@ -50,6 +50,6 @@ $cfg['ServerDefault'] = 1;
|
||||
$cfg['blowfish_secret'] = '4e38214cb34af7.78090185';
|
||||
$cfg['UploadDir'] = '';
|
||||
$cfg['SaveDir'] = '';
|
||||
$cfg['LoginCookieValidity'] = 3600 * 9;
|
||||
$cfg['LoginCookieValidity'] = 86400;
|
||||
|
||||
?>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user