Merge branch 'master' of ssh://git@192.168.78.240:22/envdev.git

Conflicts:
	lamp-trusty64/bootstrap.sh
This commit is contained in:
Michael RICOIS 2015-06-15 17:03:19 +02:00
commit 90dad7376f
2 changed files with 74 additions and 3 deletions

View File

@ -40,8 +40,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.synced_folder "../../", "/home/vhosts", owner: "www-data", group: "www-data"
config.vm.synced_folder "../../", "/home/vhosts", owner: "www-data", group: "www-data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
@ -128,5 +128,4 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
config.vm.provision :shell, :path => "./bootstrap.sh"
end

View File

@ -51,10 +51,54 @@ else
fi
fi
<<<<<<< HEAD
# --- PHP
if [ ! -f /usr/bin/php5 ]
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/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cli/php.ini
fi
# --- Configuration PHP - Apache2
if [ -f /etc/php5/apache2/php.ini ]
then
sudo sed -i -e 's/short_open_tag = Off/short_open_tag = On/g' /etc/php5/apache2/php.ini
sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/apache2/php.ini
sudo sed -i -e 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php5/apache2/php.ini
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/PHP/xdebug.ini /etc/php5/mods-available/xdebug.ini
# --- Browscap
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
fi
if [ ! -f /usr/lib/php5/20121212/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/phpchartdir550.dll /usr/lib/php5/20121212/
sudo cp /vagrant/data/ChartDirector/chartdir.lic /usr/lib/php5/20121212/
sudo cp /vagrant/data/ChartDirector/chartdir.ini /etc/php5/mods-available/
sudo php5enmod chartdir
fi
# --- Installation MariaDB
MARIADB_VERSION="10.0"
MYSQL_PASS=scores
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 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://nwps.ws/pub/mariadb/repo/10.0/ubuntu trusty main'
>>>>>>> branch 'master' of ssh://git@192.168.78.240:22/envdev.git
sudo apt-get update
sudo apt-get -y install htop unzip apache2 mysql-client-5.5 php5 php5-apcu php5-curl php5-xmlrpc php5-xsl php5-mysqlnd
if [ $VARGANTDEV -eq 1 ]
@ -101,13 +145,22 @@ then
fi
# --- Installation phpMyAdmin
<<<<<<< HEAD
=======
PHPMYADMIN_VERSION="4.4.7"
>>>>>>> branch 'master' of ssh://git@192.168.78.240:22/envdev.git
PHPMYADMIN_PATH="phpMyAdmin-$PHPMYADMIN_VERSION-all-languages"
if [ ! -d "/home/vhosts/$PHPMYADMIN_PATH" ]
then
if [ -f "$DIRDATA/Apps/$PHPMYADMIN_PATH.tar.xz" ]
then
<<<<<<< HEAD
tar xJvf "$DIRDATA/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/
mysql -hlocalhost -uroot -p$MYSQL_PASS < $DIRDATA/Apps/phpmyadmin.sql
=======
tar xJvf "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/
mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql
>>>>>>> branch 'master' of ssh://git@192.168.78.240:22/envdev.git
mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_PATH/sql/create_tables.sql
sudo service mysql restart
cp $DIRDATA/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_PATH/
@ -118,6 +171,7 @@ fi
# --- Configuration Apache
if [ ! -f /etc/apache2/conf-available/httpd.conf ]
then
<<<<<<< HEAD
sudo cp $DIRDATA/Apache/httpd.conf /etc/apache2/conf-available/
sudo a2enconf httpd
fi
@ -130,6 +184,24 @@ fi
if [ ! -f $DIR/vhosts/test.conf ]
then
cp $DIRDATA/Apache/test.conf /etc/apache2/sites-available/test.conf
=======
sudo cp /vagrant/data/Apache/httpd.conf /etc/apache2/conf-available/
sudo a2enconf httpd
if [ ! -d /home/vhosts/apachelog ]
then
sudo mkdir /home/vhosts/apachelog
fi
fi
# --- Configuration Apache / Vhosts
if [ ! -f /vagrant/vhosts/phpmyadmin.conf ]
then
cp /vagrant/data/Apache/phpmyadmin.conf /vagrant/vhosts/phpmyadmin.conf
fi
if [ ! -f /vagrant/vhosts/test.conf ]
then
cp /vagrant/data/Apache/test.conf /vagrant/vhosts/test.conf
>>>>>>> branch 'master' of ssh://git@192.168.78.240:22/envdev.git
if [ ! -d /home/vhosts/test ]
then
sudo mkdir /home/vhosts/test