Skip to content

Instantly share code, notes, and snippets.

@jspaper
Last active August 21, 2017 13:28
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 jspaper/e51c72502e98d8d36aaa22d09aa451d5 to your computer and use it in GitHub Desktop.
Save jspaper/e51c72502e98d8d36aaa22d09aa451d5 to your computer and use it in GitHub Desktop.
Vagrant ubuntu

vagrant ubuntu/xenial64

sudo apt-get -y update
sudo apt-get install -y build-essential zlib1g-dev curl git-core sqlite3 libsqlite3-dev

sudo apt-get install -y libssl-dev libreadline-dev
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source .bashrc
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build/
sudo ./install.sh
cd
rbenv install 2.3.4
rbenv global 2.3.4

gem update --system --no-ri --no-rdoc
gem install bundler --no-ri --no-rdoc
rbenv rehash

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
. ~/.bashrc
nvm install v8.3.0

postgres

sudo apt-get install -y libpq-dev

echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
  sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.6

Setup db user and password

sudo -u postgres psql
# \password
# \q

redis

cd
wget http://download.redis.io/releases/redis-4.0.1.tar.gz
tar xzf redis-4.0.1.tar.gz
cd redis-4.0.1
make
src/redis-server

yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install -y yarn


cd /vagrant
yarn install

Imagemagick

sudo apt-get install -y imagemagick
sudo apt-get install -y libmagickwand-dev

gem install rmagick --no-ri --no-rdoc
gem update --no-ri --no-rdoc

Start DB

# postgresql
sudo /etc/init.d/postgresql start|status|stop

# redis
cd ~/redis-4.0.1/src/redis-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment