Starting RethinkDB
To start your RethinkDB instance, open a terminal window and run the following command:
sudo /etc/init.d/rethinkdb start
Note
If you're running an OS that doesn't support the init
start-stop daemon, such as OS X, you'll have to start RethinkDB by running the rethinkdb
command followed by the appropriate command-line options. RethinkDB must be run with superuser privileges.
If the database starts up successfully, you will get an output similar to this:
rethinkdb: instance1: Starting instance. (logging to `/var/lib/rethinkdb/instance1/data/log_file')
As you can see from the previous output, RethinkDB gives you the path of the log file. If, by any chance, the database refuses to start, check the log for any error. In a clean installation and start up, the log will contain some statements like these:
notice: Running rethinkdb 2.0.3~0trusty (GCC 4.8.2)... notice: Running on Linux 3.13.0-36-generic x86_64 notice: Loading data from directory /var/lib/rethinkdb/instance1/data notice: Listening for intracluster connections on port 29015 notice: Listening for client driver connections on port 28015 notice: Listening for administrative HTTP connections on port 8080 notice: Listening on addresses: 127.0.0.1, 192.168.1.125 notice: Server ready, "rethinkdb1" fa0668f9-99cb-4516-b04a-1ee5466b572c
This a great deal of information. The log file tells us that the database has started running correctly, and we can access it from the specified IP addresses. It says that the server is ready and waiting for connections. Congratulations! Now, your RethinkDB server will be up and running. It's time to run your very first ReQL query.