近两年来,关系性数据库在现在多样化的数据面前展现出的种种不足,促进了nosql数据库的发展。
其中neo5j便是nosql数据库的一个比较出色的解决方案,再知识图谱的建立上有出色的表现能力,另外该方案有社区版和企业版,可以适应各种需求。
我这里是安装的社区版,做基础的数据关联。
我的ubuntu系统,使用软件库的方案安装也比较简单:
$ wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
$ echo 'deb https://debian.neo4j.org/repo stable/' | sudo tee /etc/apt/sources.list.d/neo4j.list
$ sudo apt-get update
$ sudo apt-get install neo4j # 可能会有点慢,我这边大概半小时
默认配置是在本机上运行,我由于要内网访问,所以要把配置都修改一下,修改的地方比较少,就是将所有的address地址全部改为全网接收,添上0.0.0.0这个监听:
... ...
#*****************************************************************
# Network connector configuration
#*****************************************************************
# With default configuration Neo4j only accepts local connections.
# To accept non-local connections, uncomment this line:
dbms.connectors.default_listen_address=0.0.0.0
# You can also choose a specific network interface, and configure a non-default
# port for each connector, by setting their individual listen_address.
# The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or
# it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for
# individual connectors below.
dbms.connectors.default_advertised_address=0.0.0.0
# You can also choose a specific advertised hostname or IP address, and
# configure an advertised port for each connector, by setting their
# individual advertised_address.
# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=0.0.0.0:7687
# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=0.0.0.0:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:7473
... ...
如果有必要,还需要修改数据仓库的地址:
dbms.directories.data=/var/lib/neo4j/data # 这里的数据仓库可以根据自己的需求进行修改
其他配置可以酌情处理。
参考: