Edit on Github

System Requirements

Grakn runs on Mac, Linux and Windows. The only requirement is Java 8 which can be downloaded from OpenJDK or Oracle Java.

Download and Install Grakn

Upgrading an Existing Installation to Grakn Core 1.6.x.

There has been an internal storage change in Grakn Core 1.6.x. Please back up your existing data and run the following step before doing the upgrade:

  1. Download Apache Cassandra 3.11.x and untar it
  2. Start Grakn: grakn server start
  3. Update Storage’s setting and flush the change:
    $ cd apache-cassandra-<version>
    $ bin/cqlsh localhost -e "update system.local set cluster_name = 'Grakn Cluster' where key='local';"
    $ bin/nodetool flush -- system
    
  4. Stop Grakn: grakn server stop

Once done, you are safe to upgrade as described in the next section.

[tab:Linux] #### Using RPM/DNF As a superuser, add the repo: ``` sudo dnf config-manager --add-repo https://repo.grakn.ai/repository/meta/rpm.repo ``` Install Grakn Server and Grakn Console: ``` sudo dnf install grakn-core-all ``` #### Using RPM/Yum As a superuser, add the repo: ``` sudo yum-config-manager --add-repo https://repo.grakn.ai/repository/meta/rpm.repo ``` Update the package cache: ``` sudo yum update ``` Install Grakn Server and Grakn Console: ``` sudo yum install grakn-core-all ``` #### Using APT As a superuser, add the repo: ``` sudo apt install software-properties-common apt-transport-https sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 8F3DA4B5E9AEF44C sudo add-apt-repository 'deb [ arch=all ] https://repo.grakn.ai/repository/apt/ trusty main' ``` Update the package cache: ``` sudo apt update ``` Install Grakn Server and Grakn Console: ``` sudo apt install grakn-core-all ``` #### Manual Download Download the [latest release](https://grakn.ai/download?os=linux#core), unzip it in a location on your machine that is easily accessible via terminal. Having installed or downloaded Grakn, we can now start the [Server](#start-the-grakn-server) and interact with the [Console](../running-grakn/console). [tab:end] [tab:Mac OS X] #### Using Homebrew ``` brew tap graknlabs/tap brew install graknlabs/tap/grakn-core ``` To upgrade an existing installation via brew: ``` brew upgrade graknlabs/tap/grakn-core ``` #### Manual Download Download the [latest release](https://grakn.ai/download?os=mac_os_x#core), unzip it in a location on your machine that is easily accessible via terminal.
[Warning] At the moment, to avoid encountering a permission error, you need to unzip the downloaded distribution using the `unzip` command via terminal, i.e. `unzip grakn-core-all-mac.zip`. This is a known issue that is expected to be resolved with the next release.
Having installed or downloaded Grakn, we can now start the [Server](#start-the-grakn-server) and interact with the [Console](../running-grakn/console). [tab:end] [tab:Windows] #### Manual Download Download the [latest release](https://grakn.ai/download?os=windows#core), unzip it in a location on your machine that is easily accessible via command prompt. Having downloaded Grakn, we can now start the [Server](#start-the-grakn-server) and interact with the [Console](../running-grakn/console). [tab:end] [tab:Docker] #### Using Docker To pull the Grakn Docker image, run: ``` docker pull graknlabs/grakn:latest ``` #### Without an External Volume For testing purposes, run: ``` docker run --name grakn -d -p 48555:48555 graknlabs/grakn:latest ```
[Warning] Running the instance without specifying a volume does NOT save the data if the instance is killed.
#### With an External Volume To ensure that data is preserved even when the instance is killed or restarted, run: ``` docker run --name grakn -d -v $(pwd)/db/:/grakn-core-all-linux/server/db/ -p 48555:48555 graknlabs/grakn:latest ``` Having started the instance, the Grakn Server is expected to be running on port `48555` on your machine. To interact with the [Grakn Console](../running-grakn/console), run: ``` docker exec -ti grakn bash -c '/grakn-core-all-linux/grakn console' ``` [tab:end]

Start the Grakn Server

If you have installed Grakn using a package manager, to start the Grakn Server, run grakn server start.

Otherwise, if you have manually downloaded Grakn, cd into the unzipped folder and run ./grakn server start.

Stop the Grakn Server

If you have installed Grakn using a package manager, to stop the Grakn Server, run grakn server stop.

Otherwise, if you have manually downloaded Grakn, cd into the unzipped folder and run ./grakn server stop.

Check the Server Status

If you have installed Grakn using a package manager, to check the status of the Grakn Server, run grakn server status.

Otherwise, if you have manually downloaded Grakn, cd into the unzipped folder and run ./grakn server status.

Summary

So far we have learned how to download/install Grakn and run the Grakn Server.

Next, we learn how to configure the Grakn Server and interact with a Grakn knowledge graph via the Grakn Console.