Dgraph Installation Tarball Method
Dgraph is a native GraphQL database with a graph backend. The official tutorial shows the docker installation method. Here is the instruction to install Dgraph via the tarball method.
Steps
Go to the official GitHub repository of Dgraph: https://github.com/dgraph-io/dgraph.
Go to the release section: https://github.com/dgraph-io/dgraph/releases.
After you decide on the release version, under assets
, download the file that matches your operating system. For example, if you are using Linux operating system, you should look for dgraph-linux-amd64.tar.gz. Click on the file to download it.
Unpack the tar.gz
file using the following command:
# unpack to current directory
$ tar -xzf dgraph-linux-amd64.tar.gz
# or unpack to a folder
$ mkdir -p foldername
$ tar -xzf dgraph-linux-amd64.tar.gz -C foldername
# you should see 3 files
$ ls
badger dgraph dgraph-ratel
# to start server
$ ./dgraph zero
$ ./dgraph alpha
# to start UI
$ ./dgraph-ratel
With the above code executed, the server should be active now. You can verify by looking at the log. Or simply go to localhost:8000
, which is the Dgraph's UI.
There you have it, the tarball installation method. Follow the rest of the Dgraph official documentation.
Published: 2021-03-30 | Updated: 2021-04-02