什么是Neo4j?
Neo4j是一个高性能的,NOSQL图形数据库,它将结构化数据存储在网络上而不是表中。它是一个嵌入式的、基于磁盘的、具备完全的事务特性的Java持久化引擎,但是它将结构化数据存储在网络(从数学角度叫做图)上而不是表中。Neo4j也可以被看作是一个高性能的图引擎,该引擎具有成熟数据库的所有特性。程序员工作在一个面向对象的、灵活的网络结构下而不是严格、静态的表中——但是他们可以享受到具备完全的事务特性、企业级的数据库的所有好处。
neo4j官网:http://www.neo4j.org
废话说多了,直接上安装,越发觉得Windows
的Docker
超级好用,所以直接上Docker
安装
Windows的Docker中安装Neo4j
代码语言:javascript复制查找合适的镜像
$ docker search neo4j
拉取镜像
$ docker pull neo4j
验证是否拉取成功
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
neo4j latest a4db428a51ee 6 days ago 559MB
启动neo4j镜像
$ docker run -p 7474:7474 -p 7687:7687 -v /d/neo4j/data:/data -v /d/neo4j/logs:/log -v /d/neo4j/conf:/var/lib/neo4j/conf --name neo4j -d neo4j
简单解释一下 启动镜像的命令 -p 指的是映射端口 -v 指的事映射数据卷 -d 后台运行 这里的 /d/neo4j/data 指的事Windows下D盘的neo4j/data文件夹
启动成功
代码语言:javascript复制Directories in use:
home: /var/lib/neo4j
config: /var/lib/neo4j/conf
logs: /logs
plugins: /var/lib/neo4j/plugins
import: NOT SET
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/lib/neo4j/run
Starting Neo4j.
2021-05-13 02:40:42.068 0000 INFO Note that since you did not explicitly set the port in dbms.connector.bolt.advertised_address Neo4j automatically set it to 7687 to match dbms.connector.bolt.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2021-05-13 02:40:42.070 0000 INFO Note that since you did not explicitly set the port in dbms.connector.http.advertised_address Neo4j automatically set it to 7474 to match dbms.connector.http.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2021-05-13 02:40:42.075 0000 INFO Starting...
2021-05-13 02:40:44.616 0000 INFO ======== Neo4j 4.2.6 ========
2021-05-13 02:40:46.391 0000 INFO Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2021-05-13 02:40:46.392 0000 INFO Updating the initial password in component 'security-users'
2021-05-13 02:40:46.836 0000 INFO Bolt enabled on 0.0.0.0:7687.
2021-05-13 02:40:48.219 0000 INFO Remote interface available at http://localhost:7474/
2021-05-13 02:40:48.221 0000 INFO Started.
现在启动的neo4j
是不能访问的,默认禁止远程连接
访问neo4j
http://localhost:7474/
默认账号密码都是 neo4j/neo4j
看到界面即启动成功
喜欢编程的,请关注我的博客https://www.lzmvlog.top/