Monday, June 20, 2022

Installing #neo4j on #centos 9 using #docker and accessing from #remote...

In this post, you will see how to install neo4j graphDB on a remote with no GUI access. We will install this db on centos9 OS and access the web-based GUI on local machine.

Steps:

  • Login to the remote VM using ssh -i <keyfile> centos@<ip of the VM> command
  • Create following directories
    • mkdir neo4j && cd neo4j
    • mkdir -p data logs import plugins
  • Execute following docker command to download and run neo4j docker image
 docker run \
    -d
    --restart always \
    --publish=7474:7474 --publish=7687:7687 \
    --env NEO4J_AUTH=neo4j/test \
    --user="$(id -u):$(id -g)" \
    --volume=$HOME/neo4j/data:/data \
    -v $HOME/neo4j/logs:/logs \
    -v $HOME/neo4j/import:/var/lib/neo4j/import \
    -v $HOME/neo4j/plugins:/plugins \
    neo4j:latest
  • Now in the local machine, open your terminal or command prompt and execute the following command
      ssh -i <keyfile> -N -f -L localhost:7474:localhost:7474 centos@<Remote VM ip>
  • Now open any web browser and enter following address
    • http://localhost:7474
 In the below video, you can get the detailed steps for more better clarity. Please reach out to me https://kodu.ut.ee/~dehury/ if you have any confusion.

No comments:

Post a Comment