SiriDB Prompt provides a terminal client for communicating with SiriDB.
Note: Since version 2.1.0 SiriDB Prompt is written in Go. For the most recent version in Python you should go to this release tag.
SiriDB Prompt can be compiled from source or, for most systems, you can simply download a pre-compiled binary.
Go to https://github.com/SiriDB/siridb-prompt/releases/latest and download the binary for your system.
In this documentation we refer to the binary as
siridb-prompt. On Linux/OSX it might be required to set the execution flag:
$ chmod +x siridb-prompt_X.Y.Z_OS_ARCH.bin
You might want to copy the binary to /usr/local/bin and create a symlink like this:
$ sudo cp siridb-prompt_X.Y.Z_OS_ARCH.bin /usr/local/bin/ $ sudo ln -s /usr/local/bin/siridb-prompt_X.Y.Z_OS_ARCH.bin /usr/local/bin/siridb-prompt
X.Y.Z_OS_ARCHwith your binary, for example
Compile from source
Before compiling from source make sure go and git are installed and your $GOPATH is set.
Clone the project using git. (we assume git is installed)
git clone https://github.com/SiriDB/siridb-prompt
Install the required go packages
$ go get -d
Build SiriDB Prompt
$ go build -o siridb-prompt
Connect via SSH
Build SSH tunnel by running the following command in the terminal window:
$ ssh login@server -L 9000:127.0.0.1:9000 -N
You will get response asking you to enter your SSH password
Now when the tunnel is built stop the previous command and set it into background to be able to initiate other commands.
Ctrl+Z to stop the command and you should get response:
+ Stopped ssh login@server -L 9000:127.0.0.1:9000 -N
to set it in background, type
bg and you should get response:
+ ssh login@server -L 9000:127.0.0.1:9000 -N &
Connect to SiriDB as if it is running on your local system, for example by running the following command in the terminal window:
$ siridb-prompt -d database -u user -s localhost:9000
That's it! You are in.
When finished you can close your SSH tunnel:
get it into foreground: press
fg and you will get the response:
ssh login@server -L 9000:127.0.0.1:9000 -N
Ctrl+C to stop it.