If you need a database management system with a native multi-model and robust user interface, including high availability, you may want to look at Dgraph. This database platform is used by small and large companies that process massive amounts of data. The system provides synchronous replication, and automatic failover so losing a hard disk or a server doesn’t affect services. This brief tutorial shows students and new users how to install Dgraph on Ubuntu 16.04 | 18.04 LTS servers. For more about Dgraph, please visit its homepage.
Install Required Packages
To install Dgraph, you may want to install some required packages and prepare your server. First, run the commands below to install curl and apt-transport-https. After installing the package above, continue below to install Dgraph.
Install Dgraph
Now that some required packages are installed, follow the steps below to get Dgraph installed and configured. Dgraph has an official script that allows you to easily install and configure the server. To get the script, run the commands below: When you run the script above, you’re prompted to accept the license agreement and others. After the steps above, run the commands below to install them. you should see a similar message as shown below: Although Dgraph is installed and can function, there’s no way to control its services via Systemd. With that, we’ll want to create these services so managing startups and shutdowns can be easy. To do that, run the commands below to create a system user called dgraph. After that, run the commands below to create directories for Dgraph logs and state files. After creating the directories above, you can begin creating each of the systemd service profiles for each of the services. There are three services we need to create: dgraph-zero.service, graph-ui.service and dgraph.service For dgraph.service, run the commands below: Then copy and paste the lines below into the file and save. For dgraph-zero.service, run the commands below: Then copy and paste the lines below into the file and save. For graph-ui.service. run the commands below: Then copy and paste the lines below into the file and save. After the above, That should do it! When you check the status of the service, you should see them all running and active. See all services below: Now you continue below to access its web interface.
Access Dgraph Web Interface
Dgraph also comes with a web interface for easy management in your web browser. To login, go the server hostname or IP address followed by port # 8000 Log on with no passwords. Enjoy! Congratulations! You have successfully installed Dgraph on Ubuntu 16.04 and 18.05 You may also like the post below: