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..46716f4 100755 --- a/install.sh +++ b/install.sh @@ -12,11 +12,10 @@ 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 "--- Updating packages list ---" -sudo apt-get update +#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 "--- 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 @@ -24,18 +23,38 @@ 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 ---" +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. ---" @@ -52,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? ---"