企业网站怎么做才能留住客户,山东省两学一做网站,华为云自助建站,如何让百度搜到我的网站1、HugeGraph-Server与HugeGraph-Hubble下载
HugeGraph官方地址#xff1a;https://hugegraph.apache.org/ 环境为#xff1a;linux
官网是有模块版本对应关系,尽量下载较新版本,hubble1.5.0之前是studio功能比较少。官网已经下架server,其他模块下载也比较慢。可以在网上找…1、HugeGraph-Server与HugeGraph-Hubble下载
HugeGraph官方地址https://hugegraph.apache.org/ 环境为linux
官网是有模块版本对应关系,尽量下载较新版本,hubble1.5.0之前是studio功能比较少。官网已经下架server,其他模块下载也比较慢。可以在网上找资源下载。本文选用HugeGraph-Server0.12.0和HugeGraph-Hubble1.6.0网盘资源:https://pan.baidu.com/s/1BBT65L2S0FiW_8oPcqqOKA 5ats
2、HugeGraph模块介绍
componentsdescriptionHugeGraph-Server核心服务端图数据到后端的存储。支持的后端包括MemoryCassandraScyllaDB RocksDBHBaseMySQL和PostgreSQLHugeGraph-HubbleWeb可视化管理平台一站式可视化分析平台。平台覆盖从数据建模到数据快速导入再到数据线上线下分析、图统一管理的全流程;HugeGraph-ClientRESTful API 客户端用于连接到 HugeGraph-Server。目前仅实现Java版本。其他语言的用户可以自己实现;HugeGraph-Loader数据导入工具它将普通文本数据转换为图形顶点和边缘并插入图形数据库;HugeGraph-Spark对图进行并行计算如PageRank算法等HugeGraph-Tools命令行工具集部署和管理工具包括管理图形、备份/恢复、Gremlin 执行等功能。
3、HugeGraph-server与HugeGraph-Hubble安装和配置
将下载好的hugegraph-0.12.0.tar.gz和hugegraph-hubble-1.6.0.tar.gz压缩包解压到安装目录下。如下图我是安装在/opt/hugegraph0.12.0下。对两个目录及包含文件进行授权要么在上传服务器时和启动时可能出现未知问题也可只对操作的内容进行授权
4、HugeGraph-server主要配置文件
componentsdescriptiongremlin-server.yamlgremlin图数据库查询语言服务配置,无特殊需要默认即可rest-server.properties如果需要外部访问HugeGraphServer请修改rest-server.properties的restserver.url配置项 默认为http://127.0.0.1:8080修改成机器名或IP地址hugegraph.properties具体图实例的配置每个图一个配置文件图的名称就是文件的名称。可默认也可修改后端存储 MySQL和PostgreSQL等
主要修改内容 hugegraph.properties 可默认RocksDB,以下是修改为mysql根据实际需要修改后端存储数据库打开对应注释配置好连接。
# auth config: com.baidu.hugegraph.auth.HugeFactoryAuthProxy
gremlin.graphcom.baidu.hugegraph.HugeFactory# cache config
#schema.cache_capacity100000
# vertex-cache default is 1000w, 10min expired
vertex.cache_typel2
#vertex.cache_capacity10000000
#vertex.cache_expire600
# edge-cache default is 100w, 10min expired
edge.cache_typel2
#edge.cache_capacity1000000
#edge.cache_expire600# schema illegal name template
#schema.illegal_name_regex\s|~.*#vertex.default_labelvertexbackendmysql
serializermysqlstorehugegraphraft.modefalse
raft.safe_readfalse
raft.use_snapshotfalse
raft.endpoint127.0.0.1:8281
raft.group_peers127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283
raft.path./raft-log
raft.use_replicator_pipelinetrue
raft.election_timeout10000
raft.snapshot_interval3600
raft.backend_threads48
raft.read_index_threads8
raft.read_strategyReadOnlyLeaseBased
raft.queue_size16384
raft.queue_publish_timeout60
raft.apply_batch1
raft.rpc_threads80
raft.rpc_connect_timeout5000
raft.rpc_timeout60000search.text_analyzerjieba
search.text_analyzer_modeINDEX# rocksdb backend config
#rocksdb.data_path/path/to/disk
#rocksdb.wal_path/path/to/disk# cassandra backend config
cassandra.hostlocalhost
cassandra.port9042
cassandra.username
cassandra.password
#cassandra.connect_timeout5
#cassandra.read_timeout20
#cassandra.keyspace.strategySimpleStrategy
#cassandra.keyspace.replication3# hbase backend config
#hbase.hostslocalhost
#hbase.port2181
#hbase.znode_parent/hbase
#hbase.threads_max64# mysql backend config
jdbc.drivercom.mysql.jdbc.Driver
jdbc.urljdbc:mysql://127.0.0.1:3306
jdbc.usernameroot
jdbc.passwordroot
jdbc.reconnect_max_times3
jdbc.reconnect_interval3
jdbc.sslmodefalse# postgresql cockroachdb backend config
#jdbc.driverorg.postgresql.Driver
#jdbc.urljdbc:postgresql://localhost:5432/
#jdbc.usernamepostgres
#jdbc.password
#jdbc.postgresql.connect_databasetemplate1# palo backend config
#palo.host127.0.0.1
#palo.poll_interval10
#palo.temp_dir./palo-data
#palo.file_limit_size32rest-server.properties修改restserver.url即可
# bind url
restserver.urlhttp://0.0.0.0:8080
# gremlin server url, need to be consistent with host and port in gremlin-server.yaml
#gremlinserver.urlhttp://127.0.0.1:8182#graphs[hugegraph:conf/hugegraph.properties]网上说修改成这样但是报错默认即可
graphs./conf/graphs# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0
batch.max_write_ratio80
batch.max_write_threads0# authentication configs
# choose com.baidu.hugegraph.auth.StandardAuthenticator or com.baidu.hugegraph.auth.ConfigAuthenticator
#auth.authenticator# for StandardAuthenticator mode
#auth.graph_storehugegraph
# auth client config
#auth.remote_url127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897# for ConfigAuthenticator mode
#auth.admin_token
#auth.user_tokens[]# rpc group configs of multi graph servers
# rpc server configs
rpc.server_host127.0.0.1
rpc.server_port8090
#rpc.server_timeout30# rpc client configs (like enable to keep cache consistency)
rpc.remote_url127.0.0.1:8090
#rpc.client_connect_timeout20
#rpc.client_reconnect_period10
#rpc.client_read_timeout40
#rpc.client_retries3
#rpc.client_load_balancerconsistentHash# lightweight load balancing (beta)
server.idserver-1
server.rolemaster
5、HugeGraph-Hubble主要配置文件
componentsdescriptionhugegraph-hubble.propertiesweb可视化配置访问
hugegraph-hubble.properties修改访问可视化界面的ip及端口号
server.host127.0.0.1
server.port8088
gremlin.suffix_limit250
gremlin.vertex_degree_limit100
gremlin.edges_total_limit500
gremlin.batch_query_ids1006、启动hugegraph-server
启动分为首次启动和非首次启动这么区分是因为在第一次启动前需要初始化后端数据库然后启动服务。
首次启动进入hugegraph-0.12.0目录下的bin目录启动init-store.sh。 执行命令为
bash init-store.sh启动server进入hugegraph-0.12.0目录下的bin目录启动start-hugegraph.sh。 执行命令为
bash start-hugegraph.sh7、启动hugegraph-Hubble
进入hugegraph-hubble-1.6.0目录下的bin目录启动start-hubble.sh。 执行命令为
bash start-hubble.sh8、测试 hugegraph-server
访问 http://服务器ip:8080/graphs
结果{ “graphs”: [ “hugegraph” ]}
9、测试 hugegraph-Hubble
访问hugegraph-hubble.properties配置文件中配置的ip加端口号。 第一次需要创建图填写信息图名称就是hugegraph.properties配置文件名称也可在配置文件中配置。 访问进去之后就可以创建属性、顶点、边类型等进行一系列操作。 可以通过gremin语句进行查询创建实体创建边等。 例如创建一个姓名为李四的人。 通过官网提供的API操作图数据库如下图