Skip to content

Instantly share code, notes, and snippets.

@chrisabrams
Last active July 29, 2018 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chrisabrams/8214877 to your computer and use it in GitHub Desktop.
Save chrisabrams/8214877 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get dist-upgrade
# Install dependencies
sudo apt-get install -y curl
sudo apt-get install -y dkms python-software-properties python build-essential linux-headers-generic linux-headers-$(uname -r)
sudo apt-get install -y linux-image-extra-virtual
sudo apt-get install -y git-core
# Setup the VM to be visible on OS X networks. See link for more info:
# http://missingreadme.wordpress.com/2010/05/08/how-to-set-up-afp-filesharing-on-ubuntu/
sudo apt-get install -y netatalk
sudo /etc/init.d/netatalk restart
sudo apt-get install -y avahi-daemon libnss-mdns
sudo cp /vagrant/lib/nsswitch.conf /etc/nsswitch.conf
sudo cp /vagrant/lib/afpd.service /etc/avahi/services/afpd.service
sudo /etc/init.d/avahi-daemon restart
# Install pre-built Node 0.10.22
mkdir /opt/node && cd /opt/node
sudo chown -R vagrant /opt/node
wget http://nodejs.org/dist/v0.10.22/node-v0.10.22-linux-x64.tar.gz
tar -xvzf node-v0.10.22-linux-x64.tar.gz
mv /opt/node/node-v0.10.22-linux-x64/* /opt/node
rm -rf node-v0.10.22-linux-x64
rm node-v0.10.22-linux-x64.tar.gz
cat >> ~/.bashrc << EOF
export PATH=$PATH:/opt/node/bin
EOF
source ~/.bashrc
# Setup my depends.
npm install -g yo bower grunt-cli coffee-script serve generator-generator generator-chaplin
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :shell, :path => "bootstrap.sh"
config.vm.network "private_network", ip: "192.168.56.10"
config.vm.provider "virtualbox" do |vm|
vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
#config.ssh.private_key_path = "~/.ssh/id_rsa"
config.ssh.forward_agent = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment