Skip to content

Instantly share code, notes, and snippets.

@dantheman213
Last active December 15, 2015 04:06
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 dantheman213/4bb9546267c7dac00d51 to your computer and use it in GitHub Desktop.
Save dantheman213/4bb9546267c7dac00d51 to your computer and use it in GitHub Desktop.
vagrant setup script for development server
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 21, host: 2121
# config.vm.synced_folder "hostdir", "/guestdir"
config.vm.provider "virtualbox" do |vb|
# if having problems booting, uncomment this
# to see if errors are happening in GUI
# vb.gui = true
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
## Initial package list updates and OS upgrades
sudo apt-get update
sudo apt-get upgrade -y
## Install nginx web server ##
sudo apt-get install -y nginx
## End ##
## Install Apache web server ##
# sudo apt-get install -y apache2
## End ##
## Install Node JS ##
sudo apt-get install -y nodejs nodejs-legacy npm
## End ##
## Install mongodb ##
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org libkrb5-dev
## End ##
## Install FastCGI w/ PHP ##
sudo apt-get install -y php5-fpm
## End ##
## Install More Useful Utilities ##
sudo apt-get install -y git screen
## End ##
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment