Skip to content

Instantly share code, notes, and snippets.

@mattisbusycom
Created May 30, 2015 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattisbusycom/0bb05447bee99ccec85e to your computer and use it in GitHub Desktop.
Save mattisbusycom/0bb05447bee99ccec85e to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# Make sure apt-git has a current list of repos.
sudo apt-get upgrade --show-upgrade
sudo apt-get update
# Install any required packages.
apt-get install -y curl tmux wget
apt-get install -y apache2
apt-get install -y php5
apt-get install -y libapache2-mod-php5
apt-get install -y php5-mysqlnd php5-curl php5-xdebug php5-gd php5-intl php-pear php5-imap php5-mcrypt php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php-soap php5-dev*
# Setup MySQL
# Ignore the post install questions
export DEBIAN_FRONTEND=noninteractive
# Install MySQL quietly
apt-get -q -y install mysql-server-5.5
mysql -u root -e "CREATE DATABASE IF NOT EXISTS edgarreader"
mysql -u root -e "GRANT ALL PRIVILEGES ON edgarreader.* TO 'edgarreader'@'localhost' IDENTIFIED BY 'password'"
mysql -u root -e "FLUSH PRIVILEGES"
# Install Composer's dependencies.
cd /vagrant/
curl -sS https://getcomposer.org/installer | php
php composer.phar install
mv composer.phar /usr/local/bin/composer
# Update the php.ini file as necessary: #
# Make sure phar.readonly is off.
sudo sed -i".bak" "s/^\;phar.readonly.*$/phar.readonly = Off/g" /etc/php5/cli/php.ini
# Make sure a timezone is set.
sudo sed -i "s/^\;date\.timezone.*$/date\.timezone = \"America\\/New_York\" /g" /etc/php5/cli/php.ini
Vagrant.configure(2) do |config|
config.vm.box = "lucid32"
config.vm.provision :shell, :path => "vagrant-provision.sh"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777","fmode=666"]
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.name = "tenants-edgarreader-com"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment