Skip to content

Instantly share code, notes, and snippets.

@stefanprodan
Last active August 29, 2015 14:23
Show Gist options
  • Save stefanprodan/dbaabb66a4ed96422160 to your computer and use it in GitHub Desktop.
Save stefanprodan/dbaabb66a4ed96422160 to your computer and use it in GitHub Desktop.
RethinkDB Ubuntu Trusty dev cluster setup

Install

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

Run as service

sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
sudo nano /etc/rethinkdb/instances.d/instance1.conf

Edit instance1.conf

bind=0.0.0.0 
server-name=udev1  

Start the server

sudo /etc/init.d/rethinkdb start

Open the log file if start fails

sudo nano /var/lib/rethinkdb/instance1/data/log_file

Run instance2

sudo cp /etc/rethinkdb/instances.d/instance1.conf /etc/rethinkdb/instances.d/instance2.conf
sudo nano /etc/rethinkdb/instances.d/instance2.conf

Set port offset to 1 and point to instance1

port-offset=1
join=localhost:29015

Restart cluster

 sudo /etc/init.d/rethinkdb restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment