Install Memgraph on Ubuntu
This article briefly outlines the basic steps necessary to install and run Memgraph on Ubuntu.
Newer versions of Memgraph are currently not backward compatible with older versions. That is why you won't be able to load storage snapshots between different versions.
Prerequisites
Before you proceed with the installation guide make sure that you have:
- The latest Memgraph Ubuntu Package which can be downloaded from the Memgraph download hub.
Memgraph packages are available for:
- Ubuntu 18.04
- Ubuntu 20.04
You can also directly download .deb packages for the latest Memgraph from the following URLs:
- Ubuntu 18.04 - https://download.memgraph.com/memgraph/v2.3.0/ubuntu-18.04/memgraph_2.3.0-1_amd64.deb
- Ubuntu 20.04 - https://download.memgraph.com/memgraph/v2.3.0/ubuntu-20.04/memgraph_2.3.0-1_amd64.deb
Installation guide
After downloading Memgraph as a Debian package, install it by running the following:
sudo dpkg -i /path-to/memgraph_<version>.deb
In order to perform some actions on your operating system like installing new software, you may need superuser privileges (commonly called root).
You could get errors while installing the package with the above command if you don't have all of Memgraph's dependencies installed. The issues mostly look like the following:
dpkg: error processing package memgraph (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
memgraph
To install missing dependencies and finish the installation of the Memgraph package, just issue the following command:
sudo apt-get install -f
The above command will install all missing dependencies and will finish configuring the Memgraph package.
To verify that Memgraph is running, run the following:
sudo journalctl --unit memgraph
If successful, you should receive an output similar to the following:
You are running Memgraph vX.X.X
If the Memgraph database instance is not running, you can start it explicitly::
sudo systemctl start memgraph
If you want to start Memgraph with different configuration settings, check out the Configuration section. At this point, Memgraph is ready for you to submit queries.
Stopping Memgraph
To shut down the Memgraph server, issue the following command:
sudo systemctl stop memgraph
Configuration
The Memgraph configuration is available in /etc/memgraph/memgraph.conf
. If the
configuration file is altered, Memgraph needs to be restarted. To learn about
all the configuration options, check out the Reference
guide.
Where to next?
To learn how to query the database, take a look at the
querying guide or Memgraph
Playground for interactive tutorials.
Visit the Drivers overview
page if you need to connect to the database programmatically.
Getting help
If you run into problems during the installation process, check out our installation troubleshooting guide to see if we have already covered the topic. For more information on the installation process and for additional questions, visit the Help Center page.