创建目录
mkdir /opt/neo4j-data
创建
docker run \
-d --name neo4j \
-p 7474:7474 -p 7687:7687 \
-v /opt/neo4j-data/data:/data \
-v /opt/neo4j-data/logs:/logs \
-v /opt/neo4j-data//conf:/var/lib/neo4j/conf \
-v /opt/neo4j-data/plugins:/plugins \
--env NEO4J_AUTH=neo4j/12345678 \
neo4j:5.23.0-community
安装apoc插件
https://hub.nuaa.cf/neo4j/apoc/releases/tag/5.23.0
下载apoc-5.23.0-core.jar
cd /opt/neo4j-data/plugins
重启
docker restart neo4j
登录
http://127.0.0.1:7474/browser/
填写登录信息
Connect URL neo4j://127.0.0.1:7687
Database neo4j
Authentication type Username/Password
Username neo4j
Password 12345678
其他
docker exec -it neo4j /bin/bash
删除所有节点数据,谨慎操作,MATCH (n) DETACH DELETE n
参考
官方链接:https://neo4j.com/docs/apoc/current/installation/
docker cp /mnt/sda/neo4j/plugins/apoc-5.23.0-core.jar my_neo4j:/var/lib/neo4j/plugins
验证 apoc
return apoc.version()
配置 apoc
/opt/neo4j-data/conf/neo4j.conf
dbms.security.procedures.unrestricted=apoc.*