存储后端选用Cassandra,索引用elasticsearch

  1. 新建非root用户,因为elasticsearch不能用root用户启动 【如果不需要用到elasticsearch索引 可以跳过这一步】

  2. 将JDK版本升级到1.8

  3. 从Janusgraph官网下载安装包,并解压(janusgraph-0.3.0-hadoop2.zip)

  4. Cassandra配置修改 [conf/cassandra/cassandra.yaml]
    修改3个地方:
    1)seed_provider下的seeds:[主节点IP地址]
    2)listen_address:[节点IP地址]
    3)rpc_address:[节点IP地址]

  5. 远程连接集群需要配置 [conf/remote-objects.yaml]
    hosts:[ip1,ip2,...]

  6. Janusgraph配置
    1)[conf/gremlin-server/gremlin-server.yaml]
    graphManager: org.janusgraph.graphdb.management.JanusGraphManager
    graphs: {
    ConfigurationManagementGraph: conf/gremlin-server/janusgraph-[存储后端]-[索引]-server.properties
    }
    这里我们选择janusgraph-cassandra-es.properties
    2)[conf/gremlin-server/janusgraph-cassandra-es.properties]storage.hostname与index.search.hostname都改成对应的ip

  7. 启动服务
    1)bin/casssandra (先启动主节点)
    2)elasticsearch/bin/elasticsearch
    3)bin/gremlin-server/gremlin-server.sh conf/gremlin-server/gremlin-server.yaml

  8. 查看状态
    bin/janusgraph.sh status