From 4ed7705634c85e27cd2f6ce7b7d58c0667480075 Mon Sep 17 00:00:00 2001 From: Jeffrey Way Date: Tue, 29 Oct 2013 09:47:33 -0400 Subject: [PATCH] First draft --- .DS_Store | Bin 0 -> 6148 bytes .../default/virtualbox/action_provision | 1 + .../default/virtualbox/action_set_name | 1 + .vagrant/machines/default/virtualbox/id | 1 + Vagrantfile | 25 ++++++++ install.sh | 57 ++++++++++++++++++ readme.md | 1 + 7 files changed, 86 insertions(+) create mode 100644 .DS_Store create mode 100644 .vagrant/machines/default/virtualbox/action_provision create mode 100644 .vagrant/machines/default/virtualbox/action_set_name create mode 100644 .vagrant/machines/default/virtualbox/id create mode 100644 Vagrantfile create mode 100755 install.sh create mode 100644 readme.md diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 "install.sh" + + # If true, then any SSH connections made will enable agent forwarding. + # Default value: false + # config.ssh.forward_agent = true + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # 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" +end diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..b584096 --- /dev/null +++ b/install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +echo "--- Good morning, master. Let's get to work. Installing now. ---" + +echo "--- Updating packages list ---" +sudo apt-get update + +echo "--- MySQL time ---" +sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' +sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' + +echo "--- Installing base packages ---" +sudo apt-get install -y vim curl python-software-properties + +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 + +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 +xdebug.cli_color=1 +xdebug.show_local_vars=1 +EOF + +# Apache Stuff +sudo a2enmod rewrite + +# Set root to public dir (assuming Laravel app) +sudo rm -rf /var/www +sudo ln -fs /vagrant/public /var/www + + +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 + +echo "--- Restarting Apache ---" +sudo service apache2 restart + +echo "--- Composer is the future. But you knew that, did you master? Nice job. ---" +curl -sS https://getcomposer.org/installer | php +sudo mv composer.phar /usr/local/bin/composer + +# Laravel stuff here, if you want + +echo "--- All set to go! Would you like to play a game? ---" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..bff56b7 --- /dev/null +++ b/readme.md @@ -0,0 +1 @@ +My install Bash script for Vagrant