Ubuntu16.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货!
说在前面的话
首先,查看下你的操作系统的版本。
root@zhouls-virtual-machine:~# cat /etc/issue
Ubuntu 16.04. LTS \n \l root@zhouls-virtual-machine:~#
Neo4j 是一个NoSQL的图形数据库(Graph Database)。Neo4j使用图(graph)相关的概念来描述数据模型,把数据保存为图中的节点以及节点之间的关系。很多应用中数据之间的关系,可以很直接地使用图中节点和关系的概念来建模。对于这样的应用,使用 Neo4j 来存储数据会非常的自然,要优于使用关系数据库。
官方文档对Neo4j的介绍如下所示
Neo4j is the world’s leading graph database. It is built from the ground up to be a graph database, meaning that its architecture is designed for optimizing fast management, storage, and traversal of nodes and relationships. Therefore, relationships are said to be first class citizens in Neo4j. An operation known in the relational database world as a join exhibits performance which degrades exponentially with the number of relationships. The corresponding action in Neo4j is performed as navigation from one node to another; an operation whose performance is linear.
Neo4j分社区版(Community Edition)和企业版(Enterprise Edition),社区版本为免费版本。目前的最新版本为Neo4j 3.2。
https://neo4j.com/docs/developer-manual/3.2/
https://neo4j.com/docs/operations-manual/3.2/
https://neo4j.com/docs/developer-manual/3.2/cypher/
System requirements
Neo4j的安装对硬件、系统等有一些要求,例如CPU、Memory、Disk、Filesystem、Software等
CPU
关于CPU,最低要求是Itel Core i3 推荐使用Intel Core i7 或 IBM POWER 8
Memory
关于Memory,最低要求是2GB, 推荐是16-32GB 或更多。 越大的内存允许处理越大的图,但必须正确配置,以免破垃圾收集坏性操作。
Disk
除了Disk的容量,Disk的性能对Neoj4的影响非常大,Neo4j的工作负载倾向于随机读。选择平均寻址时间低的存储,例如SSD
最低要求 10GB SATA
推荐配置 SSD w/SATA
FileSystem
最低要求 ext4(或类似的)
推荐配置 ext4、ZFS
Software
Java
必须安装OpenJDK 8 或 Oracle Java 8
Operation Sytem
Linux(Ubuntu, Debian) ,但是我的测试环境为Red Hat Enterprise Linux Server release 6.6,暂时还没有发现什么问题。
Architectures
X86 或 OpenPower(POWER8)
Ubuntu16.04下Neo4j图数据库官网安装部署步骤
第一步: 检查上面System Requirement,安装JDK 8,并卸载ubuntu里自带的openjdk。
root@zhouls-virtual-machine:~# java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj--jre-headless
* openjdk--jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk--jre-headless
Try: apt install <selected package>
root@zhouls-virtual-machine:~# sudo apt-get remove openjdk*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'openjdk-9-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre' for glob 'openjdk*'
Note, selecting 'openjdk-6-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-6-jre' for glob 'openjdk*'
Note, selecting 'openjdk-9-demo' for glob 'openjdk*'
Note, selecting 'openjdk-6-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-demo' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-dcevm' for glob 'openjdk*'
Note, selecting 'openjdk-8-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-9-dbg' for glob 'openjdk*'
Note, selecting 'openjdk-7-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-9-doc' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-zero' for glob 'openjdk*'
Note, selecting 'openjdk-8-source' for glob 'openjdk*'
Note, selecting 'openjdk-jre' for glob 'openjdk*'
Note, selecting 'openjdk-9-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-9-jre' for glob 'openjdk*'
Note, selecting 'openjdk-7-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-7-jre' for glob 'openjdk*'
Note, selecting 'openjdk-9-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-9-source' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-jamvm' for glob 'openjdk*'
Note, selecting 'openjdk-8-dbg' for glob 'openjdk*'
Note, selecting 'openjdk-8-doc' for glob 'openjdk*'
Package 'openjdk-6-jdk' is not installed, so not removed
Package 'openjdk-7-jre-headless' is not installed, so not removed
Package 'openjdk-6-jre-headless' is not installed, so not removed
Package 'openjdk-7-jre' is not installed, so not removed
Package 'openjdk-6-jre' is not installed, so not removed
Package 'openjdk-7-jdk' is not installed, so not removed
Package 'openjdk-jre' is not installed, so not removed
Package 'openjdk-8-jre-dcevm' is not installed, so not removed
Package 'openjdk-9-dbg' is not installed, so not removed
Package 'openjdk-9-demo' is not installed, so not removed
Package 'openjdk-9-doc' is not installed, so not removed
Package 'openjdk-9-jdk' is not installed, so not removed
Package 'openjdk-9-jdk-headless' is not installed, so not removed
Package 'openjdk-9-jre' is not installed, so not removed
Package 'openjdk-9-jre-headless' is not installed, so not removed
Package 'openjdk-9-source' is not installed, so not removed
Package 'openjdk-8-dbg' is not installed, so not removed
Package 'openjdk-8-demo' is not installed, so not removed
Package 'openjdk-8-doc' is not installed, so not removed
Package 'openjdk-8-jdk' is not installed, so not removed
Package 'openjdk-8-jdk-headless' is not installed, so not removed
Package 'openjdk-8-jre' is not installed, so not removed
Package 'openjdk-8-jre-headless' is not installed, so not removed
Package 'openjdk-8-jre-jamvm' is not installed, so not removed
Package 'openjdk-8-source' is not installed, so not removed
Package 'openjdk-8-jre-zero' is not installed, so not removed
upgraded, newly installed, to remove and not upgraded.
root@zhouls-virtual-machine:~#
下载 Java
Java 8 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
我暂时,传到/home/zhouls/Downloads下
我将 java 放在目录/usr/local/
目录下,路径和命令为:
root@zhouls-virtual-machine:/usr/local# ls
bin etc games include lib man sbin share src
root@zhouls-virtual-machine:/usr/local# mkdir app
root@zhouls-virtual-machine:/usr/local# cd app/
root@zhouls-virtual-machine:/usr/local/app# pwd
/usr/local/app
root@zhouls-virtual-machine:/usr/local/app# ls
root@zhouls-virtual-machine:/usr/local/app# cp /home/zhouls/Downloads/jdk-8u60-linux-x64.tar.gz .
root@zhouls-virtual-machine:/usr/local/app# ls
jdk-8u60-linux-x64.tar.gz
root@zhouls-virtual-machine:/usr/local/app#
root@zhouls-virtual-machine:/usr/local/app# ls
jdk-8u60-linux-x64.tar.gz
root@zhouls-virtual-machine:/usr/local/app# tar -zxvf jdk-8u60-linux-x64.tar.gz
为了,兼容去其余的版本,我这里使用软连接。
root@zhouls-virtual-machine:/usr/local/app# ls
jdk1..0_60 jdk-8u60-linux-x64.tar.gz
root@zhouls-virtual-machine:/usr/local/app# rm jdk-8u60-linux-x64.tar.gz
root@zhouls-virtual-machine:/usr/local/app# ll
total
drwxr-xr-x root root 6月 : ./
drwxr-xr-x root root 6月 : ../
drwxr-xr-x uucp 8月 jdk1..0_60/
root@zhouls-virtual-machine:/usr/local/app# ln -s jdk1..0_60/ jdk
root@zhouls-virtual-machine:/usr/local/app# ll
total
drwxr-xr-x root root 6月 : ./
drwxr-xr-x root root 6月 : ../
lrwxrwxrwx root root 6月 : jdk -> jdk1..0_60//
drwxr-xr-x uucp 8月 jdk1..0_60/
root@zhouls-virtual-machine:/usr/local/app# chown -R root:root jdk1..0_60/
root@zhouls-virtual-machine:/usr/local/app# ll
total
drwxr-xr-x root root 6月 : ./
drwxr-xr-x root root 6月 : ../
lrwxrwxrwx root root 6月 : jdk -> jdk1..0_60//
drwxr-xr-x root root 8月 jdk1..0_60/
root@zhouls-virtual-machine:/usr/local/app#
至于为什么这样来做,请移步
大数据各子项目的环境搭建之建立与删除软连接(博主推荐)
编辑/etc/profile文件,添加下面配置信息,然后执行source /etc/profile命令使之生效。
root@zhouls-virtual-machine:/usr/local/app# vim /etc/profile
#java
export JAVA_HOME=/usr/local/app/jdk
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
root@zhouls-virtual-machine:/usr/local/app# vim /etc/profile
root@zhouls-virtual-machine:/usr/local/app# source /etc/profile
root@zhouls-virtual-machine:/usr/local/app# java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
root@zhouls-virtual-machine:/usr/local/app#
下载Neo4j 3.1的安装包
去官方网址注册下载即可。选择特定的版本。下载地址 https://neo4j.com/download/
选择“Download Communit Edtion”社区版
在“Other OS Download”中选择 Linux 版(因为,我一般喜欢用tar.gz方式来安装,当然,大家也可以用其他方式来安装)
它会自动下载到你的本地。
https://neo4j.com/artifact.php?name=neo4j-community-3.2.0-unix.tar.gz
我这里,暂时是放在/home/zhouls/Downloads下
root@zhouls-virtual-machine:/usr/local/app# ls
jdk jdk1..0_60
root@zhouls-virtual-machine:/usr/local/app# cp /home/zhouls/Downloads/neo4j-community-3.2.-unix.tar.gz .
root@zhouls-virtual-machine:/usr/local/app# ls
jdk jdk1..0_60 neo4j-community-3.2.-unix.tar.gz
root@zhouls-virtual-machine:/usr/local/app#
root@zhouls-virtual-machine:/usr/local/app# ls
jdk jdk1..0_60 neo4j-community-3.2.-unix.tar.gz
root@zhouls-virtual-machine:/usr/local/app# tar -zxvf neo4j-community-3.2.-unix.tar.gz
root@zhouls-virtual-machine:/usr/local/app# ls
jdk jdk1..0_60 neo4j-community-3.2. neo4j-community-3.2.-unix.tar.gz
root@zhouls-virtual-machine:/usr/local/app# rm neo4j-community-3.2.-unix.tar.gz
root@zhouls-virtual-machine:/usr/local/app# ll
total
drwxr-xr-x root root 6月 : ./
drwxr-xr-x root root 6月 : ../
lrwxrwxrwx root root 6月 : jdk -> jdk1..0_60//
drwxr-xr-x root root 8月 jdk1..0_60/
drwxr-xr-x dnsmasq nogroup 5月 : neo4j-community-3.2./
root@zhouls-virtual-machine:/usr/local/app# chown -R root:root neo4j-community-3.2./
root@zhouls-virtual-machine:/usr/local/app# ln -s neo4j-community-3.2./ neo4j
root@zhouls-virtual-machine:/usr/local/app# ll
total
drwxr-xr-x root root 6月 : ./
drwxr-xr-x root root 6月 : ../
lrwxrwxrwx root root 6月 : jdk -> jdk1..0_60//
drwxr-xr-x root root 8月 jdk1..0_60/
lrwxrwxrwx root root 6月 : neo4j -> neo4j-community-3.2.//
drwxr-xr-x root root 5月 : neo4j-community-3.2./
root@zhouls-virtual-machine:/usr/local/app#
配置neo4j的环境变量
root@zhouls-virtual-machine:/usr/local/app# vim /etc/profile
#neo4j
export NEO4J_HOME=/usr/local/app/neo4j
export PATH=$PATH:$NEO4J_HOME/bin
root@zhouls-virtual-machine:/usr/local/app# vim /etc/profile
root@zhouls-virtual-machine:/usr/local/app# source /etc/profile
root@zhouls-virtual-machine:/usr/local/app#
neo4j的配置文件(图文详解)
修改conf/neo4j.conf配置文件,将dbms.connectors.default_listen_address=0.0.0.0注释字符去掉
如果不设置Neo4j的配置文件,只能从本机访问Neo4J的web控制台(http://localhost:7474/) Neo4j的控制文件一般位于<neo4jhome>/conf/neo4j.conf,例如我测试环境为/usr/local/app/neo4j/conf
修改前:#org.neo4j.server.webserver.address=0.0.0.0
修改后:org.neo4j.server.webserver.address=0.0.0.0
启动 Neo4j
root@zhouls-virtual-machine:/usr/local/app/neo4j/conf# neo4j start
Active database: graph.db
Directories in use:
home: /usr/local/app/neo4j
config: /usr/local/app/neo4j/conf
logs: /usr/local/app/neo4j/logs
plugins: /usr/local/app/neo4j/plugins
import: /usr/local/app/neo4j/import
data: /usr/local/app/neo4j/data
certificates: /usr/local/app/neo4j/certificates
run: /usr/local/app/neo4j/run
Starting Neo4j.
WARNING: Max open files allowed, minimum of recommended. See the Neo4j manual.
Started neo4j (pid ). It is available at http://0.0.0.0:7474/
There may be a short delay until the server is ready.
See /usr/local/app/neo4j/logs/neo4j.log for current status.
root@zhouls-virtual-machine:/usr/local/app/neo4j/conf# neo4j status
Neo4j is running at pid
root@zhouls-virtual-machine:/usr/local/app/neo4j/conf#
此时一切正常。
或者
bin/neo4j console
root@zhouls-virtual-machine:/usr/local/app/neo4j# ls
bin conf import LICENSES.txt logs plugins run
certificates data lib LICENSE.txt NOTICE.txt README.txt UPGRADE.txt
root@zhouls-virtual-machine:/usr/local/app/neo4j# bin/neo4j console
Active database: graph.db
Directories in use:
home: /usr/local/app/neo4j
config: /usr/local/app/neo4j/conf
logs: /usr/local/app/neo4j/logs
plugins: /usr/local/app/neo4j/plugins
import: /usr/local/app/neo4j/import
data: /usr/local/app/neo4j/data
certificates: /usr/local/app/neo4j/certificates
run: /usr/local/app/neo4j/run
Starting Neo4j.
WARNING: Max open files allowed, minimum of recommended. See the Neo4j manual.
-- ::20.269+ INFO ======== Neo4j 3.2. ========
-- ::22.614+ INFO Starting...
-- ::27.000+ INFO Bolt enabled on 0.0.0.0:.
-- ::50.131+ INFO Started.
-- ::57.150+ INFO Remote interface available at http://localhost:7474/
打开 neo4j的 Web 端
根据启动时的提示,在浏览器中打开:http://localhost:7474/
第一次登陆会提示你输入初始化密码并提醒你修改密码。默认的密码为neo4j. 如果允许远程访问,切记修改初始化密码。安全非常重要。
默认值都是neo4j
更改新密码为123456。
即我的用户名是neo4j,密码是123456。
可以点击页面上的“Start Learning”进行初步的学习 Neo4j。
至此,Neo4j 已经在 Ubuntu 上安装好了。
Ubuntu16.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)的更多相关文章
- Ubuntu14.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 说在前面的话 首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu 14.04.4 LTS ...
- Ubuntu16.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu16.04下Mongodb(离线安 ...
- Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu14.04下Mongodb(离线安 ...
- 全网最全的Windows下Anaconda2 / Anaconda3里正确下载安装Theano(图文详解)
不多说,直接上干货! Theano的安装教程目前网上一搜很多,前几天折腾了好久,终于安装成功了Anaconda3(Python3)的Theano,嗯~发博客总结并分享下经验教训吧. 渣电脑,显卡用的是 ...
- Ubuntu16.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu16.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...
- Ubuntu14.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...
- Ubuntu14.04下Mongodb数据库可视化工具安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04下Mongodb官网安装部署步骤(图 ...
- windows系统下如何正确安装Cygwin(图文详解)
我的操作系统信息是 1.在官网https://cygwin.com/install.html下载win64位安装包 选择包的下载存放目录,点击“下一步” 为了使我们安装的Cygwin能够编译程序, ...
- Ubuntu16.04下caffe CPU版的详细安装步骤
一.caffe简介 Caffe,是一个兼具表达性.速度和思维模块化的深度学习框架. 由伯克利人工智能研究小组和伯克利视觉和学习中心开发. 虽然其内核是用C++编写的,但Caffe有Python和Mat ...
随机推荐
- [leetcode tree]103. Binary Tree Zigzag Level Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to ...
- DNS隧道工具iodine
DNS隧道工具iodine 在受限制的网络中,如果DNS请求没有被限制,就可以通过DNS请求建立隧道而突破网络限制.iodine是Kali Linux提供的一款DNS隧道工具.该工具分为服务器端i ...
- Linux驱动程序中的并发控制
<临界区> a:对共享资源进行访问的代码称为临界区. <原子操作> a:原子操作用于执行轻量级,仅仅执行一次的的操作比如修改计数器,有条件的增加值,设置某一位.所谓 ...
- Go语言特点
作者:asta谢链接:https://www.zhihu.com/question/21409296/answer/18184584来源:知乎 1.Go有什么优势 可直接编译成机器码,不依赖其他库,g ...
- Codeforces Round #297 (Div. 2)B. Pasha and String 前缀和
Codeforces Round #297 (Div. 2)B. Pasha and String Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx ...
- "Blessing of Dimisionality: High Dimensional Feature and Its Efficient Compression for Face Verification"学习笔记
这\(^{[1]}\)是一篇关于如何使用高维度特征在人脸验证中的文章,作者以主要LBP为例子,论述了高维特征和验证性能存在着正相关的关系,即人脸维度越高,验证的准确度就越高.由于那时候没有用DeepL ...
- SlickOne敏捷开发框架介绍(一) -- 基于Dapper, Mvc和WebAPI 的快速开发框架
前言:在两年前(最初发布时间:2013年1月9日(csdn),当前文章时间2015年11月10日),项目组推出了基于Dapper,Mvc和WebApi的快速开发框架,随着后续Slickflow产品的实 ...
- lamp经典安装
一.网络方面的知识 2 ①-网络常见的命令 2 ②-网卡相关 2 ③-防火墙相关 2 ④-selinux相关 3 二.上传amp源代码包 5 三.linux下软件安装-vsftpd安装 6 ①-rpm ...
- ASK,OOK,FSK,GFSK是什么
http://www.21say.com/askookfskgfsk%E6%98%AF%E4%BB%80%E4%B9%88/ ASK是幅移键控调制的简写,例如二进制的,把二进制符号0和1分别用不同的幅 ...
- How to match between physical usb device and its drive letter?
struct tagDrives { WCHAR letter; WCHAR volume[ BUFFER_SIZE ]; } g_drives[ ]; // WCHAR GetUSBDrive( ) ...