Ubuntu14.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货!
说在前面的话
首先,查看下你的操作系统的版本。
root@zhouls-virtual-machine:~# cat /etc/issue
Ubuntu 14.04.4 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/ Neo4j的相关文档URL地址如下
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)
Ubuntu14.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-4.8-jre-headless
* openjdk--jre-headless
* gcj-4.6-jre-headless
* openjdk--jre-headless
Try: apt-get 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-7-tests' for regex 'openjdk*'
Note, selecting 'openjdk-jre' for regex 'openjdk*'
Note, selecting 'openjdk-6-jre-lib' for regex 'openjdk*'
Note, selecting 'openjdk-7' for regex 'openjdk*'
Note, selecting 'openjdk-6-jdk' for regex 'openjdk*'
Note, selecting 'openjdk-7-jre-zero' for regex 'openjdk*'
Note, selecting 'openjdk-6-source' for regex 'openjdk*'
Note, selecting 'openjdk-6-jre-headless' for regex 'openjdk*'
Note, selecting 'openjdk-6-dbg' for regex 'openjdk*'
Note, selecting 'openjdk-7-jdk' for regex 'openjdk*'
Note, selecting 'openjdk-7-jre-headless' for regex 'openjdk*'
Note, selecting 'openjdk-6-jre' for regex 'openjdk*'
Note, selecting 'openjdk-7-dbg' for regex 'openjdk*'
Note, selecting 'openjdk-7-jre-lib' for regex 'openjdk*'
Note, selecting 'uwsgi-plugin-jvm-openjdk-6' for regex 'openjdk*'
Note, selecting 'uwsgi-plugin-jvm-openjdk-7' for regex 'openjdk*'
Note, selecting 'openjdk-6-doc' for regex 'openjdk*'
Note, selecting 'openjdk-7-jre' for regex 'openjdk*'
Note, selecting 'openjdk-7-source' for regex 'openjdk*'
Note, selecting 'openjdk-6-jre-zero' for regex 'openjdk*'
Note, selecting 'openjdk-7-demo' for regex 'openjdk*'
Note, selecting 'openjdk-7-doc' for regex 'openjdk*'
Note, selecting 'openjdk-6-demo' for regex 'openjdk*'
Note, selecting 'uwsgi-plugin-jwsgi-openjdk-6' for regex 'openjdk*'
Note, selecting 'uwsgi-plugin-jwsgi-openjdk-7' for regex 'openjdk*'
Package 'openjdk-7' is not installed, so not removed
Package 'openjdk-jre' is not installed, so not removed
Package 'uwsgi-plugin-jvm-openjdk-6' is not installed, so not removed
Package 'uwsgi-plugin-jvm-openjdk-7' is not installed, so not removed
Package 'uwsgi-plugin-jwsgi-openjdk-6' is not installed, so not removed
Package 'uwsgi-plugin-jwsgi-openjdk-7' is not installed, so not removed
Package 'openjdk-7-dbg' is not installed, so not removed
Package 'openjdk-7-demo' is not installed, so not removed
Package 'openjdk-7-doc' is not installed, so not removed
Package 'openjdk-7-jdk' is not installed, so not removed
Package 'openjdk-7-jre' is not installed, so not removed
Package 'openjdk-7-jre-headless' is not installed, so not removed
Package 'openjdk-7-source' is not installed, so not removed
Package 'openjdk-7-tests' is not installed, so not removed
Package 'openjdk-6-dbg' is not installed, so not removed
Package 'openjdk-6-demo' is not installed, so not removed
Package 'openjdk-6-doc' is not installed, so not removed
Package 'openjdk-6-jdk' is not installed, so not removed
Package 'openjdk-6-jre' is not installed, so not removed
Package 'openjdk-6-jre-headless' is not installed, so not removed
Package 'openjdk-6-jre-lib' is not installed, so not removed
Package 'openjdk-6-jre-zero' is not installed, so not removed
Package 'openjdk-6-source' is not installed, so not removed
Package 'openjdk-7-jre-lib' is not installed, so not removed
Package 'openjdk-7-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) -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
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 Jun : ./
drwxr-xr-x root root Jun : ../
lrwxrwxrwx root root Jun : jdk -> jdk1..0_60//
drwxr-xr-x root root Aug jdk1..0_60/
drwxr-xr-x lightdm nogroup May : 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 Jun : ./
drwxr-xr-x root root Jun : ../
lrwxrwxrwx root root Jun : jdk -> jdk1..0_60//
drwxr-xr-x root root Aug jdk1..0_60/
lrwxrwxrwx root root Jun : neo4j -> neo4j-community-3.2.//
drwxr-xr-x root root May : 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
修改前:#dbms.connectors.default_listen_address=0.0.0.0
修改后: dbms.connectors.default_listen_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 上安装好了。
Ubuntu14.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)的更多相关文章
- Ubuntu16.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 说在前面的话 首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...
- Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu14.04下Mongodb(离线安 ...
- Ubuntu16.04下Mongodb官网安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 在这篇博客里,我采用了非官网的安装步骤,来进行安装.走了弯路,同时,也是不建议.因为在大数据领域和实际生产里,还是要走正规的为好. Ubuntu16.04下Mongodb(离线安 ...
- 全网最全的Windows下Anaconda2 / Anaconda3里正确下载安装Theano(图文详解)
不多说,直接上干货! Theano的安装教程目前网上一搜很多,前几天折腾了好久,终于安装成功了Anaconda3(Python3)的Theano,嗯~发博客总结并分享下经验教训吧. 渣电脑,显卡用的是 ...
- Ubuntu14.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...
- Ubuntu14.04下Mongodb数据库可视化工具安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐) Ubuntu14.04下Mongodb官网安装部署步骤(图 ...
- Ubuntu16.04下Mongodb官网卸载部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 前期博客 Ubuntu16.04下Mongodb官网安装部署步骤(图文详解)(博主推荐) https://docs.mongodb.com/manual/tutorial/ins ...
- windows系统下如何正确安装Cygwin(图文详解)
我的操作系统信息是 1.在官网https://cygwin.com/install.html下载win64位安装包 选择包的下载存放目录,点击“下一步” 为了使我们安装的Cygwin能够编译程序, ...
- 【适合公司业务】全网最详细的IDEA里如何正确新建【普通或者Maven】的Java web项目并发布到Tomcat上运行成功【博主强烈推荐】(类似eclipse里同一个workspace下【多个子项目】并存)(图文详解)
不多说,直接上干货! 首先,大家要明确,IDEA.Eclipse和MyEclipse等编辑器之间的新建和运行手法是不一样的. 如果是在Myeclipse里,则是File -> new -> ...
随机推荐
- redis 多实例 连接 加密码
=启动多个redis实例= #redis-server/usr/local/redis/redis6370.conf #redis-server/usr/local/redis/redis6371.c ...
- PHP 操作MySQL时mysql_connect( )和Mysqli( )的两种报错机制
刚开始使用PHP连接MySQL数据库的时候,如果数据库连接不成功或者,对MySQL数据库进行增删改查等操作的时候,SQL语句存在错误,而在执行PHP文件的时候,浏览器并不会抛出错误的原因,一般是空白显 ...
- Windows下Python版本的切换
通常在Windows系统下我们可能安装了多个Python版本,那么该如何进行版本的切换呢?下面就Python2.7与Python3.0版本进行简单说明. 1.首先需要在Windows上安装Python ...
- spring---transaction(2)---源代码分析(事务的定义TransactionDefinition)
写在前面 事务属性通过TransactionDefinition接口实现定义,主要有事务隔离级别.事务传播行为.事务超时时间.事务是否只读. public interface TransactionD ...
- Java Threads 多线程10分钟参考手册
1 同步 如何同步多个线程对共享资源的访问是多线程编程中最基本的问题之一.当多个线程并发访问共享数据时会出现数据处于计算中间状态或者不一致的问题,从而影响到程序的正确运行.我们通常把这 ...
- android下前端开发诡异bug记录&解决方法
1.border-radius有bug,围不住background 描述:设置了border-radius后,背景色依然会从圆角里冒出来 解决方法:在设置了border-radius的容器加上back ...
- My simplified pickit2 clone
http://simon.derr.free.fr/site/spip/spip.php?article11 This is a description of my very simplified h ...
- iframe动态改变内嵌页面高度
test.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://w ...
- 在EntityFramework6中管理DbContext的正确方式——4DbContextScope:一个简单的,正确的并且灵活的管理DbContext实例的方式(外文翻译)
(译者注:使用EF开发应用程序的一个难点就在于对其DbContext的生命周期管理,你的管理策略是否能很好的支持上层服务 使用独立事务,使用嵌套事务,并行执行,异步执行等需求? Mehdi El Gu ...
- CLR基础,CLR运行过程,使用dos命令创建、编译、运行C#文件,查看IL代码
CLR是Common Language Runtime的缩写,是.NET程序集或可执行程序运行的一个虚拟环境.CLR用于管理托管代码,但是它本身是由非托管代码编写的,并不是一个包含了托管代码的程序集, ...