Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
38 changes: 29 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,49 @@ 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

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. ---"
Expand All @@ -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? ---"