- hugegraph-server源码下载地址:https://github.com/apache/incubator-hugegraph-doc/blob/master/download.md
- hugegraph官方文档:https://hugegraph.apache.org/cn/docs/
- jdk:1.8+
- mysql:8.0.x
- hugegraph-server:0.12.0
- 操作系统:windows
gremlin-server.yaml位于hugegraph-distsrcassemblystaticconf下
- 由于win的路径问题,默认配置files: [conf/empty-sample.groovy]会找不到empty-sample.groovy这个文件,这里有两种解决办法
- 将files: [conf/empty-sample.groovy]注释掉
- 将empty-sample.groovy文件copy到/下,并修改file为files: [empty-sample.groovy]
rest-server.properties位于hugegraph-distsrcassemblystaticconf下
- 如果要对外访问,将restserver.url的host修改为0.0.0.0
- 将graphs的值改为graphs包的绝对路径
hugegraph.properties位于hugegraph-distsrcassemblystaticconfgraphs下
gremlin.graph=com.baidu.hugegraph.HugeFactory vertex.cache_type=l2 edge.cache_type=l2 # schema illegal name template #schema.illegal_name_regex=s+|~.* #vertex.default_label=vertex backend=mysql serializer=mysql store=hugegraph raft.mode=false raft.safe_read=false raft.use_snapshot=false raft.endpoint=127.0.0.1:8281 raft.group_peers=127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283 raft.path=./raft-log raft.use_replicator_pipeline=true raft.election_timeout=10000 raft.snapshot_interval=3600 raft.backend_threads=48 raft.read_index_threads=8 raft.read_strategy=ReadOnlyLeaseBased raft.queue_size=16384 raft.queue_publish_timeout=60 raft.apply_batch=1 raft.rpc_threads=80 raft.rpc_connect_timeout=5000 raft.rpc_timeout=60000 search.text_analyzer=jieba search.text_analyzer_mode=INDEX # rocksdb backend config #rocksdb.data_path=/path/to/disk #rocksdb.wal_path=/path/to/disk # cassandra backend config #cassandra.host=localhost #cassandra.port=9042 #cassandra.username= #cassandra.password= #cassandra.connect_timeout=5 #cassandra.read_timeout=20 #cassandra.keyspace.strategy=SimpleStrategy #cassandra.keyspace.replication=3 # hbase backend config #hbase.hosts=localhost #hbase.port=2181 #hbase.znode_parent=/hbase #hbase.threads_max=64 # mysql backend config jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306 jdbc.username=root jdbc.password=root jdbc.reconnect_max_times=3 jdbc.reconnect_interval=3 jdbc.sslmode=false # postgresql & cockroachdb backend config #jdbc.driver=org.postgresql.Driver #jdbc.url=jdbc:postgresql://localhost:5432/ #jdbc.username=postgres #jdbc.password= #jdbc.postgresql.connect_database=template1 # palo backend config #palo.host=127.0.0.1 #palo.poll_interval=10 #palo.temp_dir=./palo-data #palo.file_limit_size=32
- 当后端存储选用mysql时,backend和serializer都要配置为mysql
- backend=mysql
- serializer=mysql
6,program arguments应填写rest-server.properties文件的绝对路径
启动后控制台出现如下日志则初始化成功
6,program arguments应填写gremlin-server.yaml和rest-server.properties文件的绝对路径,中间用空格隔开,这里注意先后顺序,gremlin-server.yaml应在前
启动后控制台出现如下日志则启动成功



