Organisation des fichiers
This commit is contained in:
parent
7e88369921
commit
0f208d7634
@ -1,13 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get -y install htop unzip
|
||||
sudo apt-get -y upgrade
|
||||
|
||||
# Installation Wkhtmltopdf
|
||||
if [ ! -f /usr/local/bin/wkhtmltopdf ]
|
||||
then
|
||||
sudo dpkg -i /vagrant/data/wkhtmltox-0.12.1_linux-precise-amd64.deb
|
||||
sudo dpkg -i /vagrant/data/Apps/wkhtmltox-0.12.1_linux-precise-amd64.deb
|
||||
sudo apt-get -f install -y
|
||||
fi
|
||||
|
||||
@ -15,7 +14,7 @@ fi
|
||||
if [ ! -f /usr/bin/php5 ]
|
||||
then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y apache2 mysql-client-5.5 php5 php-apc php5-curl php5-xmlrpc php5-xsl php5-mysqlnd php5-xdebug
|
||||
sudo apt-get -y install htop unzip apache2 mysql-client-5.5 php5 php-apc php5-curl php5-xmlrpc php5-xsl php5-mysqlnd php5-xdebug
|
||||
sudo a2enmod autoindex deflate expires headers rewrite
|
||||
fi
|
||||
|
||||
@ -28,14 +27,14 @@ then
|
||||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
|
||||
sudo add-apt-repository 'deb http://nwps.ws/pub/mariadb/repo/10.0/ubuntu precise main'
|
||||
sudo apt-get update
|
||||
debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password password $MYSQL_PASS"
|
||||
debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password_again password $MYSQL_PASS"
|
||||
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"
|
||||
sudo apt-get -y --allow-unauthenticated install mariadb-server
|
||||
#sudo sed -i -e 's/datadir = \/var\/lib\/mysql/datadir = \/home\/vhosts\/mysql/g' /etc/mysql/my.cnf
|
||||
sudo sed -i "s/bind-address *= 127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
|
||||
sudo sed -i "s/max_connections *= 100/max_connections = 20/" /etc/mysql/my.cnf
|
||||
sudo sed -i -e 's/bind-address[ \t]*= 127.0.0.1/bind-address = 0.0.0.0/g' /etc/mysql/my.cnf
|
||||
sudo sed -i -e 's/max_connections[ \t]*= 100/max_connections = 20/g' /etc/mysql/my.cnf
|
||||
sudo service mysql restart
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/pma.sql
|
||||
mysql -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql
|
||||
sudo touch /etc/mysql/vagrant
|
||||
fi
|
||||
|
||||
@ -43,11 +42,11 @@ fi
|
||||
PHPMYADMIN_VERSION='4.3.1'
|
||||
if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ]
|
||||
then
|
||||
if [ -f "/vagrant/data/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ]
|
||||
if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ]
|
||||
then
|
||||
unzip "/vagrant/data/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql"
|
||||
cp /vagrant/data/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
|
||||
unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/
|
||||
mysql -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql"
|
||||
cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -58,18 +57,18 @@ sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/apache2/ph
|
||||
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/apache2/php.ini
|
||||
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/apache2/php.ini
|
||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/apache2/php.ini
|
||||
sudo cp /vagrant/data/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
#sudo cp /vagrant/data/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
|
||||
# Browscap
|
||||
sudo cp -f /vagrant/data/php_browscap.ini /etc/php5/apache2/
|
||||
sudo cp -f /vagrant/data/PHP/php_browscap.ini /etc/php5/apache2/
|
||||
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/apache2\/php_browscap.ini/g' /etc/php5/apache2/php.ini
|
||||
|
||||
if [ ! -f /usr/lib/php5/20121212/chartdir.lic ]
|
||||
if [ ! -f /usr/lib/php5/20090626/chartdir.lic ]
|
||||
then
|
||||
sudo cp -R /vagrant/data/ChartDirector/lib/fonts /usr/lib/php5/20121212/
|
||||
sudo cp /vagrant/data/ChartDirector/lib/libchartdir.so /usr/lib/php5/20121212/
|
||||
sudo cp /vagrant/data/ChartDirector/lib/phpchartdir530.dll /usr/lib/php5/20121212/
|
||||
sudo cp /vagrant/data/ChartDirector/chartdir.lic /usr/lib/php5/20121212/
|
||||
sudo cp -R /vagrant/data/ChartDirector/lib/fonts /usr/lib/php5/20090626/
|
||||
sudo cp /vagrant/data/ChartDirector/lib/libchartdir.so /usr/lib/php5/20090626/
|
||||
sudo cp /vagrant/data/ChartDirector/lib/phpchartdir530.dll /usr/lib/php5/20090626/
|
||||
sudo cp /vagrant/data/ChartDirector/chartdir.lic /usr/lib/php5/20090626/
|
||||
sudo cp /vagrant/data/ChartDirector/chartdir.ini /etc/php5/mods-available/
|
||||
sudo php5enmod chartdir
|
||||
fi
|
||||
@ -79,11 +78,7 @@ sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/cli/php.
|
||||
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cli/php.ini
|
||||
|
||||
# Configuration Apache
|
||||
if [ ! -f /etc/apache2/conf-available/httpd.conf ]
|
||||
then
|
||||
sudo cp /vagrant/data/httpd.conf /etc/apache2/conf-available/
|
||||
sudo a2enconf httpd
|
||||
|
||||
sudo cp -f /vagrant/data/Apache/httpd.conf /etc/apache2/conf-available/
|
||||
if [ ! -d /home/vhosts/apachelog ]
|
||||
then
|
||||
sudo mkdir /home/vhosts/apachelog
|
||||
@ -92,15 +87,14 @@ then
|
||||
then
|
||||
sudo mkdir /home/vhosts/test
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f /vagrant/vhosts/phpmyadmin.conf ]
|
||||
if [ ! -f /vagrant/vhosts/phpmyadmin ]
|
||||
then
|
||||
cp /vagrant/data/phpmyadmin.conf /vagrant/vhosts/phpmyadmin.conf
|
||||
cp /vagrant/data/Apache/phpmyadmin /vagrant/vhosts/phpmyadmin
|
||||
fi
|
||||
if [ ! -f /vagrant/vhosts/test.conf ]
|
||||
if [ ! -f /vagrant/vhosts/test ]
|
||||
then
|
||||
cp /vagrant/data/test.conf /vagrant/vhosts/test.conf
|
||||
cp /vagrant/data/Apache/test /vagrant/vhosts/test
|
||||
fi
|
||||
|
||||
# Disable all website
|
||||
|
@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get -y upgrade
|
||||
sudo apt-get -y install htop unzip
|
||||
|
||||
# Installation Wkhtmltopdf
|
||||
if [ ! -f /usr/local/bin/wkhtmltopdf ]
|
||||
then
|
||||
sudo dpkg -i /vagrant/data/wkhtmltox-0.12.1_linux-trusty-amd64.deb
|
||||
sudo dpkg -i /vagrant/data/Apps/wkhtmltox-0.12.1_linux-trusty-amd64.deb
|
||||
sudo apt-get -f install -y
|
||||
fi
|
||||
|
||||
@ -15,7 +15,7 @@ fi
|
||||
if [ ! -f /usr/bin/php5 ]
|
||||
then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y apache2 mysql-client-5.5 php5 php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd php5-xdebug
|
||||
sudo apt-get -y install apache2 mysql-client-5.5 php5 php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd php5-xdebug
|
||||
sudo a2enmod autoindex deflate expires headers rewrite
|
||||
fi
|
||||
|
||||
@ -28,14 +28,14 @@ then
|
||||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
|
||||
sudo add-apt-repository 'deb http://nwps.ws/pub/mariadb/repo/10.0/ubuntu trusty main'
|
||||
sudo apt-get update
|
||||
debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password password $MYSQL_PASS"
|
||||
debconf-set-selections <<< "mariadb-server-$MARIADB_VERSION mysql-server/root_password_again password $MYSQL_PASS"
|
||||
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"
|
||||
sudo apt-get -y --allow-unauthenticated install mariadb-server
|
||||
#sudo sed -i -e 's/datadir = \/var\/lib\/mysql/datadir = \/home\/vhosts\/mysql/g' /etc/mysql/my.cnf
|
||||
sudo sed -i "s/bind-address *= 127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
|
||||
sudo sed -i "s/max_connections *= 100/max_connections = 20/" /etc/mysql/my.cnf
|
||||
sudo sed -i -e 's/bind-address[ \t]*= 127.0.0.1/bind-address = 0.0.0.0/g' /etc/mysql/my.cnf
|
||||
sudo sed -i -e 's/max_connections[ \t]*= 100/max_connections = 20/g' /etc/mysql/my.cnf
|
||||
sudo service mysql restart
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/pma.sql
|
||||
mysql -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql
|
||||
sudo touch /etc/mysql/vagrant
|
||||
fi
|
||||
|
||||
@ -46,8 +46,8 @@ then
|
||||
if [ -f "/vagrant/data/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ]
|
||||
then
|
||||
unzip "/vagrant/data/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/
|
||||
mysql -hlocalhost -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql"
|
||||
cp /vagrant/data/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
|
||||
mysql -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql"
|
||||
cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -58,10 +58,10 @@ sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/apache2/ph
|
||||
sudo sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php5/apache2/php.ini
|
||||
sudo sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/g' /etc/php5/apache2/php.ini
|
||||
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php5/apache2/php.ini
|
||||
sudo cp /vagrant/data/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
sudo cp /vagrant/data/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini
|
||||
|
||||
# Browscap
|
||||
sudo cp -f /vagrant/data/php_browscap.ini /etc/php5/apache2/
|
||||
sudo cp -f /vagrant/data/PHP/php_browscap.ini /etc/php5/apache2/
|
||||
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php5\/apache2\/php_browscap.ini/g' /etc/php5/apache2/php.ini
|
||||
|
||||
if [ ! -f /usr/lib/php5/20121212/chartdir.lic ]
|
||||
@ -81,7 +81,7 @@ sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cl
|
||||
# Configuration Apache
|
||||
if [ ! -f /etc/apache2/conf-available/httpd.conf ]
|
||||
then
|
||||
sudo cp /vagrant/data/httpd.conf /etc/apache2/conf-available/
|
||||
sudo cp /vagrant/data/Apache/httpd.conf /etc/apache2/conf-available/
|
||||
sudo a2enconf httpd
|
||||
|
||||
if [ ! -d /home/vhosts/apachelog ]
|
||||
@ -96,11 +96,11 @@ fi
|
||||
|
||||
if [ ! -f /vagrant/vhosts/phpmyadmin.conf ]
|
||||
then
|
||||
cp /vagrant/data/phpmyadmin.conf /vagrant/vhosts/phpmyadmin.conf
|
||||
cp /vagrant/data/Apache/phpmyadmin.conf /vagrant/vhosts/phpmyadmin.conf
|
||||
fi
|
||||
if [ ! -f /vagrant/vhosts/test.conf ]
|
||||
then
|
||||
cp /vagrant/data/test.conf /vagrant/vhosts/test.conf
|
||||
cp /vagrant/data/Apache/test.conf /vagrant/vhosts/test.conf
|
||||
fi
|
||||
|
||||
# Disable all website
|
||||
|
Loading…
Reference in New Issue
Block a user