From cb0316615af48b1d59c4cd33c50655349fdcfbd4 Mon Sep 17 00:00:00 2001 From: Rik Heywood Date: Mon, 5 May 2014 14:37:10 +0100 Subject: [PATCH 1/3] Updated to support Ubuntu 14.04 LTS --- Vagrantfile | 5 +++-- install.sh | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 70f425c..68c352a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,9 +5,10 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "precise32" + config.vm.box = "ubuntu/trusty64" - config.vm.box_url = "http://files.vagrantup.com/precise32.box" + #config.vm.box_url = "http://files.vagrantup.com/precise32.box" + #config.vm.box = "precise32" config.vm.network :forwarded_port, guest: 80, host: 8080 diff --git a/install.sh b/install.sh index e20a82b..8f6dddd 100755 --- a/install.sh +++ b/install.sh @@ -12,11 +12,11 @@ sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again p echo "--- Installing base packages ---" sudo apt-get install -y vim curl python-software-properties -echo "--- We want the bleeding edge of PHP, right master? ---" -sudo add-apt-repository -y ppa:ondrej/php5 +#echo "--- We want the bleeding edge of PHP, right master? ---" +#sudo add-apt-repository -y ppa:ondrej/php5 -echo "--- Updating packages list ---" -sudo apt-get update +#echo "--- Updating packages list ---" +#sudo apt-get update echo "--- Installing PHP-specific packages ---" sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt mysql-server-5.5 php5-mysql git-core From 32f561fb72922acf9815e445fad00dafaac0786d Mon Sep 17 00:00:00 2001 From: Rik Heywood Date: Mon, 5 May 2014 22:32:16 +0100 Subject: [PATCH 2/3] updated to ensure mcrypt gets enabled and to avoid trashing home folder --- install.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 8f6dddd..e97641e 100755 --- a/install.sh +++ b/install.sh @@ -14,7 +14,6 @@ sudo apt-get install -y vim curl python-software-properties #echo "--- We want the bleeding edge of PHP, right master? ---" #sudo add-apt-repository -y ppa:ondrej/php5 - #echo "--- Updating packages list ---" #sudo apt-get update @@ -30,13 +29,20 @@ xdebug.cli_color=1 xdebug.show_local_vars=1 EOF +echo "--- Enabling mcrypt in all environments ---" +sudo php5enmod -s ALL mcrypt + echo "--- Enabling mod-rewrite ---" sudo a2enmod rewrite +# if the html directory isn't a link, then do something +if [ ! -L /var/www/html ]; then +# remove the default folder and replace with a link to the vagrant folder +# really should do this with a vhost or something echo "--- Setting document root ---" -sudo rm -rf /var/www -sudo ln -fs /vagrant/public /var/www - +sudo rm -rf /var/www/html +sudo ln -fs /vagrant/public /var/www/html +fi echo "--- What developer codes without errors turned on? Not you, master. ---" sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini From 68bc3f62cf901d96b257d430edf0f45453e39657 Mon Sep 17 00:00:00 2001 From: Rik Heywood Date: Tue, 6 May 2014 12:10:59 +0100 Subject: [PATCH 3/3] Changed the xDebug config and added composer install --- install.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e97641e..46716f4 100755 --- a/install.sh +++ b/install.sh @@ -23,10 +23,21 @@ sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5- echo "--- Installing and configuring Xdebug ---" sudo apt-get install -y php5-xdebug -cat << EOF | sudo tee -a /etc/php5/mods-available/xdebug.ini -xdebug.scream=1 +cat << EOF | sudo tee /etc/php5/mods-available/xdebug.ini +zend_extension=xdebug.so + xdebug.cli_color=1 xdebug.show_local_vars=1 +xdebug.remote_enable=true +xdebug.remote_connect_back=1 +xdebug.remote_port="9000" +xdebug.idekey=phpstorm +xdebug.scream = 0 + +xdebug.profiler_enable = 0 +xdebug.profiler_enable_trigger = 0 +xdebug.profiler_output_dir = /vagrant/temp +xdebug.profiler_output_name = cachegrind.out EOF echo "--- Enabling mcrypt in all environments ---" @@ -44,6 +55,8 @@ sudo rm -rf /var/www/html sudo ln -fs /vagrant/public /var/www/html fi + + echo "--- What developer codes without errors turned on? Not you, master. ---" sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini @@ -58,5 +71,6 @@ curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer # Laravel stuff here, if you want +composer -d /vagrant install echo "--- All set to go! Would you like to play a game? ---"