Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sent-hil
Created August 21, 2012 19:32
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 sent-hil/3418572 to your computer and use it in GitHub Desktop.
Save sent-hil/3418572 to your computer and use it in GitHub Desktop.
River (getriver.com): Install Ruby, MongoDb on clean Ubuntu server.

Ideally this process should be automated via Puppet/Chef, I just haven't gotten around to it.

Upload local SSH keys to server for password less login

Create ssh dir on server

mkdir .ssh

Upload local key from laptop

local> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'

Generate SSH key on server for access to external git repos

Generate SSH

ssh-keygen -t rsa

Copy and paste public key

cat .ssh/id_rsa.pub

Create user

sudo adduser senthil

Add user to sudoers file

sudo vim /etc/sudoers

Add following line

senthil ALL=(ALL:ALL) ALL

Install dependencies

sudo apt-get update

sudo apt-get install build-essential zlib1g-dev tcl8.5 libssl-dev libcurl4-openssl-dev git-core bison libreadline-dev tree haproxy openssl libreadline6 libreadline6-dev curl zlib1g libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool subversion

Download, compile Ruby

wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz

tar xzvf ruby-1.9.3-p194.tar.gz

cd ruby-1.9.3-p194

./configure

make

sudo make install

Install YAML

cd ruby-1.9.3-p194

cd ext/psych

ruby extconf.rb

make

sudo make install

Download, compile Rubygems

See: https://rubygems.org/pages/download

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz

tar xzvf rubygems-1.8.24.tgz

sudo ruby setup.rb

Install RVM (optional)

See: https://rvm.io/rvm/install/

curl -L https://get.rvm.io | bash -s stable --ruby

Logout and log back in

rvm pkg install readline

rvm pkg install zlib

rvm pkg install openssl

rvm install 1.9.3-head

See: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/

Install MongoDb

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

sudo vim /etc/apt/sources.list.d/10gen.list

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

sudo apt-get update

sudo apt-get install mongodb-10gen

Install common gems

sudo gem install pry pry-debugger bundler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment