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

Nginx one domain name to access multiple projects method example

Background Recently, I encountered such a problem...

A brief analysis of the game kimono memo problem

Today, after the game was restarted, I found that...

Detailed explanation of MySQL remote connection permission

1. Log in to MySQL database mysql -u root -p View...

HTML Basics: HTML Content Details

Let's start with the body: When viewing a web ...

Steps to deploy Spring Boot project using Docker

Table of contents Create a simple springboot proj...

Sample code for generating QR code using js

Some time ago, the project needed to develop the ...

MySql inserts data successfully but reports [Err] 1055 error solution

1. Question: I have been doing insert operations ...

Configure nginx to redirect to the system maintenance page

Last weekend, a brother project was preparing to ...

About Vue's 4 auxiliary functions of Vuex

Table of contents 1. Auxiliary functions 2. Examp...

HTML multi-header table code

1. Multi-header table code Copy code The code is a...

An article to understand the usage of typeof in js

Table of contents Base Return Type String and Boo...

Conditional comments to determine the browser (IE series)

<!--[if IE 6]> Only IE6 can recognize <![...

Introduction and use of js observer mode

Table of contents I. Definition 2. Usage scenario...

How to purchase and install Alibaba Cloud servers

1. Purchase a server In the example, the server p...