diff --git a/lamp-precise64/Vagrantfile b/lamp-precise64/Vagrantfile index 7ed4b8e..df24225 100644 --- a/lamp-precise64/Vagrantfile +++ b/lamp-precise64/Vagrantfile @@ -121,5 +121,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # # chef.validation_client_name = "ORGNAME-validator" + config.vm.provider "virtualbox" do |vb| + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + end + config.vm.provision :shell, :path => "./bootstrap.sh" end diff --git a/lamp-precise64/bootstrap.sh b/lamp-precise64/bootstrap.sh index a46ad2f..3abf996 100644 --- a/lamp-precise64/bootstrap.sh +++ b/lamp-precise64/bootstrap.sh @@ -1,26 +1,9 @@ #!/usr/bin/env bash +sudo apt-get update +sudo apt-get upgrade sudo apt-get -y install htop unzip -# Installation MariaDB -if [ ! -f /etc/mysql/vagrant ] -then - MARIADB_VERSION='10.0' - MYSQL_PASS='scores' - 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 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 precise main' - sudo apt-get update - sudo apt-get -y 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 service mysql restart - mysql -hlocalhost -uroot -pscores < /vagrant/data/pma.sql - sudo touch /etc/mysql/vagrant -fi - # Installation Wkhtmltopdf if [ ! -f /usr/local/bin/wkhtmltopdf ] then @@ -36,6 +19,26 @@ then sudo a2enmod autoindex deflate expires headers rewrite 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 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 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 service mysql restart + mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/pma.sql + sudo touch /etc/mysql/vagrant +fi + # Installation phpMyAdmin PHPMYADMIN_VERSION='4.3.1' if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ] @@ -43,7 +46,7 @@ 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 -pscores < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql" + 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/" fi fi @@ -55,11 +58,22 @@ 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 # Browscap sudo cp -f /vagrant/data/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 ] +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 /vagrant/data/ChartDirector/chartdir.ini /etc/php5/mods-available/ + sudo php5enmod chartdir +fi + # Configuration PHP / CLI 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 @@ -68,17 +82,17 @@ sudo sed -i -e 's/;date.timezone =/date.timezone = Europe\/Paris/g' /etc/php5/cl if [ ! -f /etc/apache2/conf-available/httpd.conf ] then sudo cp /vagrant/data/httpd.conf /etc/apache2/conf-available/ - sudo mkdir /home/vhosts/apachelog - sudo mkdir /home/vhosts/test + sudo a2enconf httpd + + if [ ! -d /home/vhosts/apachelog ] + then + sudo mkdir /home/vhosts/apachelog + fi + if [ ! -d /home/vhosts/test ] + then + sudo mkdir /home/vhosts/test + fi fi -if [ ! -f /vagrant/vhosts/phpmyadmin ] -then - cp /vagrant/data/phpmyadmin /vagrant/vhosts/phpmyadmin -if -if [ ! -f /vagrant/vhosts/test ] -then - cp /vagrant/data/test /vagrant/vhosts/test -if if [ ! -f /vagrant/vhosts/phpmyadmin.conf ] then @@ -103,7 +117,7 @@ for f in *; do then sudo cp -f $f /etc/apache2/sites-available/; VHOSTS+=" $f" -fi + fi done; sudo a2ensite $VHOSTS diff --git a/lamp-precise64/data/ChartDirector/chartdir.ini b/lamp-precise64/data/ChartDirector/chartdir.ini new file mode 100644 index 0000000..f56efef --- /dev/null +++ b/lamp-precise64/data/ChartDirector/chartdir.ini @@ -0,0 +1 @@ +extension=phpchartdir530.dll \ No newline at end of file diff --git a/lamp-precise64/data/ChartDirector/chartdir.lic b/lamp-precise64/data/ChartDirector/chartdir.lic new file mode 100644 index 0000000..c472b1e --- /dev/null +++ b/lamp-precise64/data/ChartDirector/chartdir.lic @@ -0,0 +1 @@ +DEVP-2AGF-AAFD-GAEY-BF6F-829C diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvB.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/helvB.pfc new file mode 100644 index 0000000..2b76afa Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvB.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvB08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvB08.pcf new file mode 100644 index 0000000..40e8156 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvB08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvBI.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/helvBI.pfc new file mode 100644 index 0000000..ffb77de Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvBI.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvBI08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvBI08.pcf new file mode 100644 index 0000000..b7bbbe9 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvBI08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvI.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/helvI.pfc new file mode 100644 index 0000000..666710f Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvI.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvI08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvI08.pcf new file mode 100644 index 0000000..3cf7829 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvI08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvI10.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvI10.pcf new file mode 100644 index 0000000..6ccb1a6 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvI10.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvI12.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvI12.pcf new file mode 100644 index 0000000..92cde00 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvI12.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvI14.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvI14.pcf new file mode 100644 index 0000000..8df233e Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvI14.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvR.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/helvR.pfc new file mode 100644 index 0000000..76fd57f Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvR.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvR08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvR08.pcf new file mode 100644 index 0000000..611e57d Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvR08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvR10.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvR10.pcf new file mode 100644 index 0000000..a245fae Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvR10.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvR12.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvR12.pcf new file mode 100644 index 0000000..4579ae7 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvR12.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/helvR14.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/helvR14.pcf new file mode 100644 index 0000000..e57d71a Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/helvR14.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/script.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/script.pfc new file mode 100644 index 0000000..a190d94 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/script.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timB.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/timB.pfc new file mode 100644 index 0000000..ae7667f Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timB.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timB08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timB08.pcf new file mode 100644 index 0000000..ebd9b3c Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timB08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timBI.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/timBI.pfc new file mode 100644 index 0000000..d33c105 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timBI.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timBI08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timBI08.pcf new file mode 100644 index 0000000..b5cac49 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timBI08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timI.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/timI.pfc new file mode 100644 index 0000000..c8304fe Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timI.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timI08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timI08.pcf new file mode 100644 index 0000000..9247cd4 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timI08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timI10.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timI10.pcf new file mode 100644 index 0000000..70cb962 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timI10.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timI12.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timI12.pcf new file mode 100644 index 0000000..ded7b9f Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timI12.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timI14.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timI14.pcf new file mode 100644 index 0000000..ce42cde Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timI14.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timR.pfc b/lamp-precise64/data/ChartDirector/lib/fonts/timR.pfc new file mode 100644 index 0000000..646f2ea Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timR.pfc differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timR08.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timR08.pcf new file mode 100644 index 0000000..d86708f Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timR08.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timR10.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timR10.pcf new file mode 100644 index 0000000..510811a Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timR10.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timR12.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timR12.pcf new file mode 100644 index 0000000..7f0b76c Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timR12.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/fonts/timR14.pcf b/lamp-precise64/data/ChartDirector/lib/fonts/timR14.pcf new file mode 100644 index 0000000..285b264 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/fonts/timR14.pcf differ diff --git a/lamp-precise64/data/ChartDirector/lib/libchartdir.so b/lamp-precise64/data/ChartDirector/lib/libchartdir.so new file mode 100644 index 0000000..1683eeb Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/libchartdir.so differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir530.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir530.dll new file mode 100644 index 0000000..7790561 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir530.dll differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir530mt.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir530mt.dll new file mode 100644 index 0000000..d141842 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir530mt.dll differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir550.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir550.dll new file mode 100644 index 0000000..b793096 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir550.dll differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir550mt.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir550mt.dll new file mode 100644 index 0000000..c8069e7 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir550mt.dll differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir560.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir560.dll new file mode 100644 index 0000000..a05f53e Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir560.dll differ diff --git a/lamp-precise64/data/ChartDirector/lib/phpchartdir560mt.dll b/lamp-precise64/data/ChartDirector/lib/phpchartdir560mt.dll new file mode 100644 index 0000000..e330410 Binary files /dev/null and b/lamp-precise64/data/ChartDirector/lib/phpchartdir560mt.dll differ