当前位置:   article > 正文

CentOS下安装neo4j

contos更新neo4j版本

本文记录一下在CentOS 6.7上,安装neo4j图数据库,本文安装的版本为neo4j-community-2.3.9-unix.tar.gz

下载Neo4j安装包

使用wget命令获取Neo4j安装包~如:

  1. [root@dev18 srv]# wget https://neo4j.com/artifact.php?name=neo4j-community-2.3.9-unix.tar.gz
  2. --2017-03-24 18:42:00-- https://neo4j.com/artifact.php?name=neo4j-community-2.3.9-unix.tar.gz
  3. Resolving neo4j.com... 50.19.98.36, 54.204.9.74
  4. Connecting to neo4j.com|50.19.98.36|:443... connected.
  5. HTTP request sent, awaiting response... 200 OK
  6. Length: 58730611 (56M) [application/x-gzip]
  7. Saving to: “artifact.php?name=neo4j-community-2.3.9-unix.tar.gz”
  8. 100%[====================================================================================================================================================================================================================================>] 58,730,611 6.87K/s in 48m 10s
  9. 2017-03-24 19:30:11 (19.8 KB/s) - “artifact.php?name=neo4j-community-2.3.9-unix.tar.gz” saved [58730611/58730611]

解压Neo4j安装包

使用tar -zvxf 命令解压neo4j安装包~ 如:

  1. root@dev18 srv]# tar -zvxf artifact.php\?name\=neo4j-community-2.3.9-unix.tar.gz
  2. neo4j-community-2.3.9/
  3. neo4j-community-2.3.9/bin/
  4. neo4j-community-2.3.9/data/
  5. neo4j-community-2.3.9/data/import/
  6. neo4j-community-2.3.9/data/log/
  7. neo4j-community-2.3.9/conf/
  8. neo4j-community-2.3.9/system/
  9. neo4j-community-2.3.9/system/lib/
  10. neo4j-community-2.3.9/lib/
  11. neo4j-community-2.3.9/plugins/
  12. neo4j-community-2.3.9/bin/README.txt
  13. neo4j-community-2.3.9/data/import/README.txt
  14. neo4j-community-2.3.9/data/log/README.txt
  15. neo4j-community-2.3.9/data/README.txt
  16. neo4j-community-2.3.9/CHANGES.txt
  17. neo4j-community-2.3.9/LICENSES.txt
  18. neo4j-community-2.3.9/conf/neo4j-wrapper.conf
  19. neo4j-community-2.3.9/conf/neo4j-server.properties
  20. neo4j-community-2.3.9/conf/neo4j-http-logging.xml
  21. neo4j-community-2.3.9/conf/README.txt
  22. neo4j-community-2.3.9/conf/neo4j.properties
  23. neo4j-community-2.3.9/system/lib/README.txt
  24. neo4j-community-2.3.9/system/README.txt
  25. neo4j-community-2.3.9/lib/README.txt
  26. neo4j-community-2.3.9/NOTICE.txt
  27. neo4j-community-2.3.9/README.txt
  28. neo4j-community-2.3.9/LICENSE.txt
  29. neo4j-community-2.3.9/plugins/README.txt
  30. neo4j-community-2.3.9/bin/Neo4j-Management/
  31. neo4j-community-2.3.9/bin/neo4j-import
  32. neo4j-community-2.3.9/bin/neo4j-shell
  33. neo4j-community-2.3.9/bin/neo4j-installer
  34. neo4j-community-2.3.9/bin/utils
  35. neo4j-community-2.3.9/bin/neo4j
  36. neo4j-community-2.3.9/system/resources/
  37. neo4j-community-2.3.9/system/resources/org.neo4j.server.plist
  38. neo4j-community-2.3.9/UPGRADE.txt
  39. neo4j-community-2.3.9/lib/neo4j-kernel-2.3.9.jar
  40. neo4j-community-2.3.9/lib/neo4j-primitive-collections-2.3.9.jar
  41. neo4j-community-2.3.9/lib/neo4j-unsafe-2.3.9.jar
  42. neo4j-community-2.3.9/lib/neo4j-function-2.3.9.jar
  43. neo4j-community-2.3.9/lib/neo4j-io-2.3.9.jar
  44. neo4j-community-2.3.9/lib/commons-lang3-3.3.2.jar
  45. neo4j-community-2.3.9/lib/neo4j-csv-2.3.9.jar
  46. neo4j-community-2.3.9/lib/neo4j-logging-2.3.9.jar
  47. neo4j-community-2.3.9/lib/neo4j-lucene-index-2.3.9.jar
  48. neo4j-community-2.3.9/lib/lucene-core-3.6.2.jar
  49. neo4j-community-2.3.9/lib/neo4j-graph-algo-2.3.9.jar
  50. neo4j-community-2.3.9/lib/neo4j-udc-2.3.9.jar
  51. neo4j-community-2.3.9/lib/neo4j-graph-matching-2.3.9.jar
  52. neo4j-community-2.3.9/lib/neo4j-cypher-2.3.9.jar
  53. neo4j-community-2.3.9/lib/scala-library-2.11.7.jar
  54. neo4j-community-2.3.9/lib/scala-reflect-2.11.7.jar
  55. neo4j-community-2.3.9/lib/scala-parser-combinators_2.11-1.0.4.jar
  56. neo4j-community-2.3.9/lib/neo4j-codegen-2.3.9.jar
  57. neo4j-community-2.3.9/lib/neo4j-cypher-compiler-1.9_2.11-2.0.5.jar
  58. neo4j-community-2.3.9/lib/neo4j-cypher-compiler-2.2_2.11-2.2.10.jar
  59. neo4j-community-2.3.9/lib/parboiled-scala_2.11-1.1.7.jar
  60. neo4j-community-2.3.9/lib/parboiled-core-1.1.7.jar
  61. neo4j-community-2.3.9/lib/concurrentlinkedhashmap-lru-1.4.2.jar
  62. neo4j-community-2.3.9/lib/neo4j-cypher-compiler-2.3-2.3.9.jar
  63. neo4j-community-2.3.9/lib/neo4j-cypher-frontend-2.3-2.3.9.jar
  64. neo4j-community-2.3.9/lib/opencsv-2.3.jar
  65. neo4j-community-2.3.9/lib/neo4j-jmx-2.3.9.jar
  66. neo4j-community-2.3.9/lib/neo4j-consistency-check-2.3.9.jar
  67. neo4j-community-2.3.9/lib/neo4j-consistency-check-legacy-2.3.9.jar
  68. neo4j-community-2.3.9/lib/server-api-2.3.9.jar
  69. neo4j-community-2.3.9/lib/neo4j-shell-2.3.9.jar
  70. neo4j-community-2.3.9/lib/jline-2.12.jar
  71. neo4j-community-2.3.9/lib/neo4j-import-tool-2.3.9.jar
  72. neo4j-community-2.3.9/system/lib/asm-5.0.2.jar
  73. neo4j-community-2.3.9/system/lib/neo4j-server-2.3.9.jar
  74. neo4j-community-2.3.9/system/lib/jsr311-api-1.1.2.r612.jar
  75. neo4j-community-2.3.9/system/lib/commons-configuration-1.10.jar
  76. neo4j-community-2.3.9/system/lib/commons-lang-2.6.jar
  77. neo4j-community-2.3.9/system/lib/commons-logging-1.1.1.jar
  78. neo4j-community-2.3.9/system/lib/commons-digester-2.1.jar
  79. neo4j-community-2.3.9/system/lib/commons-beanutils-1.8.3.jar
  80. neo4j-community-2.3.9/system/lib/neo4j-browser-2.3.9.jar
  81. neo4j-community-2.3.9/system/lib/logback-classic-1.1.2.jar
  82. neo4j-community-2.3.9/system/lib/logback-core-1.1.2.jar
  83. neo4j-community-2.3.9/system/lib/slf4j-api-1.7.6.jar
  84. neo4j-community-2.3.9/system/lib/logback-access-1.1.2.jar
  85. neo4j-community-2.3.9/system/lib/jetty-server-9.2.9.v20150224.jar
  86. neo4j-community-2.3.9/system/lib/javax.servlet-api-3.1.0.jar
  87. neo4j-community-2.3.9/system/lib/jetty-http-9.2.9.v20150224.jar
  88. neo4j-community-2.3.9/system/lib/jetty-util-9.2.9.v20150224.jar
  89. neo4j-community-2.3.9/system/lib/jetty-io-9.2.9.v20150224.jar
  90. neo4j-community-2.3.9/system/lib/jetty-webapp-9.2.9.v20150224.jar
  91. neo4j-community-2.3.9/system/lib/jetty-xml-9.2.9.v20150224.jar
  92. neo4j-community-2.3.9/system/lib/jetty-servlet-9.2.9.v20150224.jar
  93. neo4j-community-2.3.9/system/lib/jetty-security-9.2.9.v20150224.jar
  94. neo4j-community-2.3.9/system/lib/jersey-server-1.19.jar
  95. neo4j-community-2.3.9/system/lib/jersey-core-1.19.jar
  96. neo4j-community-2.3.9/system/lib/jersey-servlet-1.19.jar
  97. neo4j-community-2.3.9/system/lib/netty-all-4.0.28.Final.jar
  98. neo4j-community-2.3.9/system/lib/commons-io-2.4.jar
  99. neo4j-community-2.3.9/system/lib/jackson-jaxrs-1.9.13.jar
  100. neo4j-community-2.3.9/system/lib/jackson-core-asl-1.9.13.jar
  101. neo4j-community-2.3.9/system/lib/jackson-mapper-asl-1.9.13.jar
  102. neo4j-community-2.3.9/system/lib/rrd4j-2.2.jar
  103. neo4j-community-2.3.9/system/lib/rhino-1.7R4.jar
  104. neo4j-community-2.3.9/system/lib/bcprov-jdk15on-1.52.jar
  105. neo4j-community-2.3.9/system/lib/bcpkix-jdk15on-1.52.jar
  106. neo4j-community-2.3.9/system/lib/jersey-multipart-1.19.jar
  107. neo4j-community-2.3.9/system/lib/mimepull-1.9.3.jar
  108. neo4j-community-2.3.9/system/lib/neo4j-server-2.3.9-static-web.jar
  109. [root@dev18 srv]#

修改目录名neo4j-community-2.3.9neo4j~

  1. [root@dev18 srv]# mv neo4j-community-2.3.9/ neo4j
  2. [root@dev18 srv]#

启动

进入neo4j的bin目录,使用./neo4j console ~~

  1. [root@dev18 neo4j]# cd bin
  2. [root@dev18 bin]# ll
  3. total 48
  4. -rwxr-xr-x 1 112 nfsnobody 10712 Jan 18 19:14 neo4j
  5. -rwxr-xr-x 1 112 nfsnobody 3652 Jan 18 19:14 neo4j-import
  6. -rwxr-xr-x 1 112 nfsnobody 4445 Jan 18 19:14 neo4j-installer
  7. drwxr-xr-x 2 112 nfsnobody 4096 Jan 18 19:14 Neo4j-Management
  8. -rwxr-xr-x 1 112 nfsnobody 3520 Jan 18 19:14 neo4j-shell
  9. -rw-r--r-- 1 112 nfsnobody 136 Jan 18 19:14 README.txt
  10. -rwxr-xr-x 1 112 nfsnobody 10642 Jan 18 19:14 utils

 

查看进程~

  1. [root@dev18 ~]# ps -ef| grep neo4j
  2. root 20854 20815 6 19:55 pts/2 00:00:19 /usr/java/jdk1.7.0_71/bin/java -cp /srv/neo4j/lib/commons-lang3-3.3.2.jar:/srv/neo4j/lib/concurrentlinkedhashmap-lru-1.4.2.jar:/srv/neo4j/lib/jline-2.12.jar:/srv/neo4j/lib/lucene-core-3.6.2.jar:/srv/neo4j/lib/neo4j-codegen-2.3.9.jar:/srv/neo4j/lib/neo4j-consistency-check-2.3.9.jar:/srv/neo4j/lib/neo4j-consistency-check-legacy-2.3.9.jar:/srv/neo4j/lib/neo4j-csv-2.3.9.jar:/srv/neo4j/lib/neo4j-cypher-2.3.9.jar:/srv/neo4j/lib/neo4j-cypher-compiler-1.9_2.11-2.0.5.jar:/srv/neo4j/lib/neo4j-cypher-compiler-2.2_2.11-2.2.10.jar:/srv/neo4j/lib/neo4j-cypher-compiler-2.3-2.3.9.jar:/srv/neo4j/lib/neo4j-cypher-frontend-2.3-2.3.9.jar:/srv/neo4j/lib/neo4j-function-2.3.9.jar:/srv/neo4j/lib/neo4j-graph-algo-2.3.9.jar:/srv/neo4j/lib/neo4j-graph-matching-2.3.9.jar:/srv/neo4j/lib/neo4j-import-tool-2.3.9.jar:/srv/neo4j/lib/neo4j-io-2.3.9.jar:/srv/neo4j/lib/neo4j-jmx-2.3.9.jar:/srv/neo4j/lib/neo4j-kernel-2.3.9.jar:/srv/neo4j/lib/neo4j-logging-2.3.9.jar:/srv/neo4j/lib/neo4j-lucene-index-2.3.9.jar:/srv/neo4j/lib/neo4j-primitive-collections-2.3.9.jar:/srv/neo4j/lib/neo4j-shell-2.3.9.jar:/srv/neo4j/lib/neo4j-udc-2.3.9.jar:/srv/neo4j/lib/neo4j-unsafe-2.3.9.jar:/srv/neo4j/lib/opencsv-2.3.jar:/srv/neo4j/lib/parboiled-core-1.1.7.jar:/srv/neo4j/lib/parboiled-scala_2.11-1.1.7.jar:/srv/neo4j/lib/scala-library-2.11.7.jar:/srv/neo4j/lib/scala-parser-combinators_2.11-1.0.4.jar:/srv/neo4j/lib/scala-reflect-2.11.7.jar:/srv/neo4j/lib/server-api-2.3.9.jar:/srv/neo4j/system/lib/asm-5.0.2.jar:/srv/neo4j/system/lib/bcpkix-jdk15on-1.52.jar:/srv/neo4j/system/lib/bcprov-jdk15on-1.52.jar:/srv/neo4j/system/lib/commons-beanutils-1.8.3.jar:/srv/neo4j/system/lib/commons-configuration-1.10.jar:/srv/neo4j/system/lib/commons-digester-2.1.jar:/srv/neo4j/system/lib/commons-io-2.4.jar:/srv/neo4j/system/lib/commons-lang-2.6.jar:/srv/neo4j/system/lib/commons-logging-1.1.1.jar:/srv/neo4j/system/lib/jackson-core-asl-1.9.13.jar:/srv/neo4j/system/lib/jackson-jaxrs-1.9.13.jar:/srv/neo4j/system/lib/jackson-mapper-asl-1.9.13.jar:/srv/neo4j/system/lib/javax.servlet-api-3.1.0.jar:/srv/neo4j/system/lib/jersey-core-1.19.jar:/srv/neo4j/system/lib/jersey-multipart-1.19.jar:/srv/neo4j/system/lib/jersey-server-1.19.jar:/srv/neo4j/system/lib/jersey-servlet-1.19.jar:/srv/neo4j/system/lib/jetty-http-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-io-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-security-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-server-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-servlet-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-util-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-webapp-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jetty-xml-9.2.9.v20150224.jar:/srv/neo4j/system/lib/jsr311-api-1.1.2.r612.jar:/srv/neo4j/system/lib/logback-access-1.1.2.jar:/srv/neo4j/system/lib/logback-classic-1.1.2.jar:/srv/neo4j/system/lib/logback-core-1.1.2.jar:/srv/neo4j/system/lib/mimepull-1.9.3.jar:/srv/neo4j/system/lib/neo4j-browser-2.3.9.jar:/srv/neo4j/system/lib/neo4j-server-2.3.9.jar:/srv/neo4j/system/lib/neo4j-server-2.3.9-static-web.jar:/srv/neo4j/system/lib/netty-all-4.0.28.Final.jar:/srv/neo4j/system/lib/rhino-1.7R4.jar:/srv/neo4j/system/lib/rrd4j-2.2.jar:/srv/neo4j/system/lib/slf4j-api-1.7.6.jar:/srv/neo4j/conf -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:hashCode=5 -Dneo4j.ext.udc.source=tarball -Dneo4j.home=/srv/neo4j -Dneo4j.instance=/srv/neo4j -Dfile.encoding=UTF-8 org.neo4j.server.CommunityBootstrapper
  3. root 21027 21009 0 20:00 pts/0 00:00:00 grep neo4j
  4. [root@dev18 ~]#

 

  1. [root@dev18 bin]# ./neo4j console
  2. Starting Neo4j Server console-mode...
  3. 2017-03-24 19:55:51.577+0800 INFO No SSL certificate found, generating a self-signed certificate..
  4. 2017-03-24 19:55:58.076+0800 INFO Successfully started database
  5. 2017-03-24 19:55:58.154+0800 INFO Starting HTTP on port 7474 (2 threads available)
  6. 2017-03-24 19:55:58.477+0800 INFO Enabling HTTPS on port 7473
  7. 2017-03-24 19:55:58.593+0800 INFO Mounting static content at /webadmin
  8. 2017-03-24 19:55:58.671+0800 INFO Mounting static content at /browser
  9. 2017-03-24 19:56:03.075+0800 INFO Remote interface ready and available at http://localhost:7474/

访问Admin UI问题

使用http://<IP>:7474访问neo4j的管理页面,访问不了~

解决方法

本文采用的方法,修改<neo4j_home>/conf目录下的neo4j-server.properties配置文件~

  1. [root@dev18 neo4j]# cd conf/
  2. [root@dev18 conf]# ll
  3. total 24
  4. -rw-r--r-- 1 112 nfsnobody 1454 Jan 18 19:14 neo4j-http-logging.xml
  5. -rw-r--r-- 1 112 nfsnobody 1796 Jan 18 19:14 neo4j.properties
  6. -rw-r--r-- 1 112 nfsnobody 3255 Jan 18 19:14 neo4j-server.properties
  7. -rw-r--r-- 1 112 nfsnobody 2288 Jan 18 19:14 neo4j-wrapper.conf
  8. -rw-r--r-- 1 112 nfsnobody 762 Jan 18 19:14 README.txt
  9. drwxr-xr-x 2 root root 4096 Mar 24 19:55 ssl
  10. [root@dev18 conf]#
  11. [root@dev18 conf]#
  12. [root@dev18 conf]# vim neo4j-server.properties

 

200921_lh9z_2911530.png

将原先注释掉的选项,去掉注释“#”, 好让其它的ip也能访问~

200843_6Y33_2911530.png

修改好配置之后,重新启动~

  1. [root@dev18 bin]#
  2. [root@dev18 bin]# ./neo4j console
  3. Starting Neo4j Server console-mode...
  4. 2017-03-24 20:09:58.801+0800 INFO Successfully started database
  5. 2017-03-24 20:09:58.843+0800 INFO Starting HTTP on port 7474 (2 threads available)
  6. 2017-03-24 20:09:59.155+0800 INFO Enabling HTTPS on port 7473
  7. 2017-03-24 20:09:59.277+0800 INFO Mounting static content at /webadmin
  8. 2017-03-24 20:09:59.385+0800 INFO Mounting static content at /browser
  9. 2017-03-24 20:10:03.472+0800 INFO Remote interface ready and available at http://0.0.0.0:7474/

 

访问http://<IP>:7474,可以展示UI界面了~

201100_a0KQ_2911530.png

设置密码~

201211_5j08_2911530.png

设置密码后,进入页面,可以看到很多的说明教程,有兴趣的读者可以搭建一个玩玩~

201314_FM9w_2911530.png

 

201452_FMyc_2911530.png

 

201515_kj4P_2911530.png

 

转载于:https://my.oschina.net/wangmengjun/blog/866511

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/897558
推荐阅读
相关标签
  

闽ICP备14008679号