Docker
docker pull dgraph/dgraph:shuri
# You can test that it worked fine, by running:
docker run -it dgraph/dgraph:shuri dgraph
Automatic download
Running
curl https://get.dgraph.io -sSf | bash
# Test that it worked fine, by running:
dgraph
would install the dgraph
binary into your system.
Other instalation options:
Add
-s --
before the flags.()-y | --accept-license
: Automatically agree to the terms of the Dgraph Community License (default: “n”).
-s | --systemd
: Automatically create Dgraph’s installation as Systemd services (default: “n”).
-v | --version
: Choose Dgraph’s version manually (default: The latest stable release, you can do tag combinations e.g v2.0.0-beta1 or -rc1).
Installing Dgraph and requesting the automatic creation of systemd service. e.g:
curl https://get.dgraph.io -sSf | bash -s -- --systemd
Using Environment variables:
ACCEPT_LICENSE
: Automatically agree to the terms of the Dgraph Community License (default: “n”).
INSTALL_IN_SYSTEMD
: Automatically create Dgraph’s installation as Systemd services (default: “n”).
VERSION
: Choose Dgraph’s version manually (default: The latest stable release).
curl https://get.dgraph.io -sSf | VERSION=v2.0.0-beta1 bash
Manual download [optional]
If you don’t want to follow the automatic installation method, you could manually download the appropriate tar for your platform from Dgraph releases. After downloading the tar for your platform from Github, extract the binary to /usr/local/bin
like so.
# For Linux
$ sudo tar -C /usr/local/bin -xzf dgraph-linux-amd64-VERSION.tar.gz
# For Mac
$ sudo tar -C /usr/local/bin -xzf dgraph-darwin-amd64-VERSION.tar.gz
# Test that it worked fine, by running:
dgraph
Building from Source
Make sure you have Go v1.11+ installed.
You’ll need the following dependencies to install Dgraph using make
:
sudo apt-get update
sudo apt-get install gcc make
After installing Go, run
# This should install dgraph binary in your $GOPATH/bin.
git clone https://github.com/dgraph-io/dgraph.git
cd ./dgraph
make install
If you get errors related to grpc
while building them, your
go-grpc
version might be outdated. We don’t vendor in go-grpc
(because it
causes issues while using the Go client). Update your go-grpc
by running.
go get -u -v google.golang.org/grpc
This is a companion discussion topic for the original entry at https://dgraph.io/docs/deploy/download/