Explanation of building graph database neo4j in Linux environment

Explanation of building graph database neo4j in Linux environment

Neo4j (one of the Nosql) is a high-performance graph database (does not support distribution) and is often used in social relationships. There are many introductions to Neo4j on the Internet, so I will not go into details here. Let's briefly talk about installation:

1. Install jdk, no more words:

ubuntu@VM-0-15-ubuntu:~$ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

2. Download and unzip neo4j (community edition) from the official website, as follows:

ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db$ ll
total 77504
drwxrwxr-x 3 ubuntu ubuntu 4096 Feb 1 18:20 ./
drwxrwxr-x 8 ubuntu ubuntu 4096 Feb 2 14:56 ../
drwxr-xr-x 11 ubuntu ubuntu 4096 Feb 1 18:21 neo4j-community-3.2.9/
-rw-r--r-- 1 ubuntu ubuntu 79268344 Feb 1 18:17 neo4j-community-3.2.9-unix.tar.gz
ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db$

3. I built neo4j on Linux and then accessed it with a browser on Windows, so I had to let neo4j listen to all IPs, not just 127.0.0.1. I needed to modify the configuration file. The configuration file is:

ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db/neo4j-community-3.2.9/conf$ ls
neo4j.conf

To remove the comment of the following line, it will be:

dbms.connectors.default_listen_address=0.0.0.0

In this way, the browser on Windows can be anti-counterfeiting, otherwise neo4j on Linux listens to 127.0.0.1:7474, and Windows can't access it.

4. Start neo4j as follows:

ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db/neo4j-community-3.2.9/bin$ ls
cypher-shell neo4j neo4j-admin neo4j-import neo4j-shell tools
ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db/neo4j-community-3.2.9/bin$ ./neo4j start

As you can see, port 7474 is being listened to:

ubuntu@VM-0-15-ubuntu:~/taoge/neo4j_db/neo4j-community-3.2.9/bin$ netstat -nao | grep 7474
tcp 0 0 0.0.0.0:7474 0.0.0.0:* LISTEN off (0.00/0/0)

5. Enter http://ip:7474 (ip is the IP address of the Linux machine) in the Windows browser, then enter the default username neo4j and the default password neo4j, and then change it to the new password as required.

6. Click around, look around, explore, and build a map:

CREATE (English:Book { title:"A book about English",released:2000 })
CREATE (Math:Book { title:"A book about Math",released:2001 })
CREATE (Law:Book { title:"A book about Law",released:2002 })
CREATE (taogeLi:Person { name:"Li Taoge", born:1988 })
CREATE (taogeZhou:Person { name:"Zhou Taoge", born:1989 })
CREATE (taogeWang:Person { name:"Wang Taoge", born:1990 })
CREATE (taogeLi)-[:write { roles: ["co-author"]}]->(English)
CREATE (taogeLi)-[:write { roles: ["co-author"]}]->(Math)
CREATE (taogeLi)-[:like]->(English)
CREATE (taogeLi)-[:like]->(Law)
CREATE (taogeZhou)-[:hate]->(Law)
CREATE (taogeZhou)-[:hate]->(taogeWang)
CREATE (taogeWang)-[:hate]->(taogeZhou)
CREATE (taogeWang)-[:like]->(Law)
RETURN English,Math,Law,taogeLi,taogeZhou,taogeWang

Let’s take a look at the effect:

More will be introduced later. When it comes to unfamiliar things, think more, explore more, and check more information, that is the truth.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • How to build Spark's Python programming environment under Linux
  • How to use Samba to build a shared file service on a Linux server
  • Detailed explanation of Apache website service configuration based on Linux
  • Detailed explanation of setting up DNS server in Linux
  • Using vsftp to build an FTP server under Linux (with parameter description)
  • Explanation of installation and configuration of building go environment under linux
  • Code example of using nextcloud to build a personal network disk under Linux

<<:  Download MySQL 5.7 and detailed installation diagram for MySql on Mac

>>:  Detailed explanation of the adaptive adaptation problem of Vue mobile terminal

Recommend

Avoiding Problems Caused by Closures in JavaScript

About let to avoid problems caused by closure Use...

Tips for implementing multiple borders in CSS

1. Multiple borders[1] Background: box-shadow, ou...

How to Learn Algorithmic Complexity with JavaScript

Table of contents Overview What is Big O notation...

Using JS to implement a small game of aircraft war

This article example shares the specific code of ...

RHEL7.5 mysql 8.0.11 installation tutorial

This article records the installation tutorial of...

Use Docker to create a distributed lnmp image

Table of contents 1. Docker distributed lnmp imag...

CSS3 flexible box flex to achieve three-column layout

As the title says: The height is known, the width...

Detailed explanation of the getBoundingClientRect() method in js

1. getBoundingClientRect() Analysis The getBoundi...

How to make your own native JavaScript router

Table of contents Preface Introduction JavaScript...

Detailed explanation of JS ES6 coding standards

Table of contents 1. Block scope 1.1. let replace...

Vue.js handles Icon icons through components

Icon icon processing solution The goal of this re...

In-depth study of how to use positioning in CSS (summary)

Introduction to Positioning in CSS position attri...

Tutorial on customizing rpm packages and building yum repositories for Centos

1 Keep the rpm package downloaded when yum instal...