tugraph在Ubuntu 20.04上安装

参考文档:

https://tugraph-db.readthedocs.io/zh-cn/latest/5.installation%26running/7.tugraph-running.html

介质下载:

Releases · TuGraph-family/tugraph-db · GitHub

安装记录:

root@node11:~# ll
total 466780
drwx------  8 root root      4096 9月   3 09:56 ./
drwxr-xr-x 22 root root      4096 8月   2 16:22 ../
drwxr-xr-x  2 root root      4096 7月  29 14:01 bak/
-rw-------  1 root root     30485 9月   2 17:16 .bash_history
-rw-r--r--  1 root root      3106 12月  5  2019 .bashrc
drwx------  3 root root      4096 8月   2 15:59 .cache/
drwx------  3 root root      4096 7月  12  2023 .config/
-rw-r--r--  1 root root         0 8月   2 16:40 .gitconfig
drwxr-xr-x  3 root root      4096 7月  29 15:56 .local/
drwxr-xr-x  2 root root      4096 9月   2 14:25 .neo4j/
-rw-r--r--  1 root root       161 12月  5  2019 .profile
drwx------  3 root root      4096 7月  12  2023 snap/
-rw-r--r--  1 root root 477581976 9月   3 09:56 tugraph-4.3.2-1.x86_64.deb
-rw-r--r--  1 root root    262144 9月   3 09:44 tugraph-4.3.2-1.x86_64.deb.1
-rw-------  1 root root     37763 9月   2 15:26 .viminfo
-rw-r--r--  1 root root       295 9月   3 09:38 .wget-hsts
-rw-r--r--  1 root root       652 9月   3 09:06 wget-log
-rw-------  1 root root       340 9月   3 09:56 .Xauthority
root@node11:~# dpkg -i tugraph-4.3.2-1.x86_64.deb 
Selecting previously unselected package tugraph.
(Reading database ... 202724 files and directories currently installed.)
Preparing to unpack tugraph-4.3.2-1.x86_64.deb ...
Unpacking tugraph (4.3.2) ...
Setting up tugraph (4.3.2) ...
root@node11:~# ll
total 466780
drwx------  8 root root      4096 9月   3 09:56 ./
drwxr-xr-x 22 root root      4096 8月   2 16:22 ../
drwxr-xr-x  2 root root      4096 7月  29 14:01 bak/
-rw-------  1 root root     30485 9月   2 17:16 .bash_history
-rw-r--r--  1 root root      3106 12月  5  2019 .bashrc
drwx------  3 root root      4096 8月   2 15:59 .cache/
drwx------  3 root root      4096 7月  12  2023 .config/
-rw-r--r--  1 root root         0 8月   2 16:40 .gitconfig
drwxr-xr-x  3 root root      4096 7月  29 15:56 .local/
drwxr-xr-x  2 root root      4096 9月   2 14:25 .neo4j/
-rw-r--r--  1 root root       161 12月  5  2019 .profile
drwx------  3 root root      4096 7月  12  2023 snap/
-rw-r--r--  1 root root 477581976 9月   3 09:56 tugraph-4.3.2-1.x86_64.deb
-rw-r--r--  1 root root    262144 9月   3 09:44 tugraph-4.3.2-1.x86_64.deb.1
-rw-------  1 root root     37763 9月   2 15:26 .viminfo
-rw-r--r--  1 root root       295 9月   3 09:38 .wget-hsts
-rw-r--r--  1 root root       652 9月   3 09:06 wget-log
-rw-------  1 root root       340 9月   3 09:56 .Xauthority
root@node11:~# cd /usr/local/
root@node11:/usr/local# ll
total 44
drwxr-xr-x 11 root root 4096 9月   3 09:57 ./
drwxr-xr-x 15 root root 4096 7月  12  2023 ../
drwxr-xr-x  2 root root 4096 9月   3 09:57 bin/
drwxr-xr-x  2 root root 4096 9月   3 09:57 etc/
drwxr-xr-x  2 root root 4096 8月  31  2022 games/
drwxr-xr-x  8 root root 4096 9月   3 09:57 include/
drwxr-xr-x  3 root root 4096 8月  31  2022 lib/
drwxr-xr-x  2 root root 4096 9月   3 09:57 lib64/
lrwxrwxrwx  1 root root    9 7月  12  2023 man -> share/man/
drwxr-xr-x  2 root root 4096 8月  31  2022 sbin/
drwxr-xr-x 10 root root 4096 9月   3 09:57 share/
drwxr-xr-x  2 root root 4096 8月  31  2022 src/
root@node11:/usr/local# which lgraph_server 
/usr/local/bin/lgraph_server
root@node11:/usr/local# ll /usr/local/etc/lgraph.json 
-rw-r--r-- 1 root root 470 7月  29 09:44 /usr/local/etc/lgraph.json
root@node11:/usr/local# more /usr/local/etc/lgraph.json 
{
    "directory" : "/var/lib/lgraph/data",
    "host" : "0.0.0.0",
    "port" : 7070,
    "rpc_port" : 9090,
    "enable_rpc" : true,
    "bolt_port": 7687,
    "enable_ha" : false,
    "verbose" : 1,
    "log_dir" : "/var/log/lgraph_log",
    "disable_auth" : false,
    "ssl_auth" : false,
    "server_key" : "/usr/local/etc/lgraph/server-key.pem",
    "server_cert" : "/usr/local/etc/lgraph/server-cert.pem",
    "web" : "/usr/local/share/lgraph/browser-resource"
}
root@node11:/usr/local# netstat -tunlp|grep LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      699076/systemd-reso 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1227/sshd: /usr/sbi 
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      822611/docker-proxy 
tcp        0      0 0.0.0.0:8887            0.0.0.0:*               LISTEN      822593/docker-proxy 
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      704458/tinyproxy    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      823418/cupsd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      823418/cupsd        
tcp6       0      0 :::22                   :::*                    LISTEN      1227/sshd: /usr/sbi 
tcp6       0      0 :::3306                 :::*                    LISTEN      822635/docker-proxy 
tcp6       0      0 :::7474                 :::*                    LISTEN      818464/java         
tcp6       0      0 :::7687                 :::*                    LISTEN      818464/java         
tcp6       0      0 :::8887                 :::*                    LISTEN      822606/docker-proxy 
tcp6       0      0 :::8888                 :::*                    LISTEN      704458/tinyproxy    
root@node11:/usr/local# ps -ef|grep java
neo4j    818432      1  0 9月02 ?       00:00:54 /usr/bin/java -Xmx128m -classpath /usr/share/neo4j/lib/*:/usr/share/neo4j/etc:/usr/share/neo4j/repo/* -Dapp.name=neo4j -Dapp.pid=818432 -Dapp.repo=/usr/share/neo4j/repo -Dapp.home=/usr/share/neo4j -Dbasedir=/usr/share/neo4j org.neo4j.server.startup.Neo4jBoot console
neo4j    818464 818432  1 9月02 ?       00:18:51 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /var/lib/neo4j/plugins/*:/etc/neo4j/*:/usr/share/neo4j/lib/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -XX:MaxInlineLevel=15 -XX:-UseBiasedLocking -Djdk.nio.maxCachedBufferSize=262144 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -Dlog4j2.disable.jmx=true -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/var/lib/neo4j --config-dir=/etc/neo4j
root     822764 822717  0 9月02 ?       00:02:26 java -jar arks-sofaboot-0.0.1-SNAPSHOT-executable.jar --server.repository.impl.jdbc.host=mysql --server.repository.impl.jdbc.password=openspg --cloudext.graphstore.url=tugraph://tugraph:9090?graphName=default&timeout=50000&accessId=admin&accessKey=73@TuGraph --cloudext.searchengine.url=elasticsearch://elasticsearch:9200?scheme=http
root     825595 825002  0 09:59 pts/0    00:00:00 grep --color=auto java
root@node11:/usr/local# 
root@node11:/usr/local# netstat -tunlp|grep 7070
root@node11:/usr/local# netstat -tunlp|grep 9090
root@node11:/usr/local# netstat -tunlp|grep 7687
tcp6       0      0 :::7687                 :::*                    LISTEN      818464/java  
  

此服务器之前安装了neo4j所以7687的端口存在冲突问题,需要修改tugraph的bolt端口,避免冲突,否则启动失败。

root@node11:/usr/local# lgraph_server -d start
lgraph_server: error while loading shared libraries: liblgraph.so: cannot open shared object file: No such file or directory
root@node11:/usr/local# cd bin
root@node11:/usr/local/bin# ./lgraph_server -d start -c lgraph.json
./lgraph_server: error while loading shared libraries: liblgraph.so: cannot open shared object file: No such file or directory
root@node11:/usr/local/bin# find / -name liblgraph.so
/usr/local/lib64/liblgraph.so
/var/lib/docker/overlay2/c73b11f89a2658dbaf9bbfb2fae8ed20ff49936ea8be2122872fae1dfd3c786b/diff/usr/local/lib64/liblgraph.so
/var/lib/docker/overlay2/cb090a16bc0828f15e3d0de3297dfaa2276ee3972162ada0b2313b8ecdd8d411/diff/usr/local/lib64/liblgraph.so
find: '/run/user/125/gvfs': Permission denied
root@node11:/usr/local/bin# echo $LD_LIBRARY_PATH

root@node11:/usr/local/bin# export LD_LIBRARY_PATH=/usr/local/lib64
root@node11:/usr/local/bin# echo $LD_LIBRARY_PATH
/usr/local/lib64
root@node11:/usr/local/bin# ./lgraph_server -d start -c lgraph.json
Error opening config file lgraph.json
root@node11:/usr/local/bin# ./lgraph_server -d start
Starting lgraph...
The service process is started at pid 825625.
root@node11:/usr/local/bin# netstat -tunlp|grep 7070
root@node11:/usr/local/bin# netstat -tunlp|grep 9090
root@node11:/usr/local/bin# ps -ef|grep 825625
root     825709 825002  0 10:07 pts/0    00:00:00 grep --color=auto 825625
root@node11:/usr/local/bin# pwd
/usr/local/bin
root@node11:/usr/local/bin# lgraph_server 
root@node11:/usr/local/bin# ps -ef|grep lgraph
root     825792 825002  0 10:07 pts/0    00:00:00 grep --color=auto lgraph

root@node11:/usr/local/bin# ./lgraph_server --log_dir ""
[20240903 10:08:07.307997 0x00007f59380569c0 INFO  src/server/lgraph_server.cpp:166] 
**********************************************************************
*                  TuGraph Graph Database v4.3.2                     *
*                                                                    *
*    Copyright(C) 2018-2023 Ant Group. All rights reserved.          *
*                                                                    *
**********************************************************************
Server is configured with the following parameters:
  Backup log enable:                   0
  DB directory:                        /var/lib/lgraph/data
  HA enable:                           0
  HTTP port:                           7070
  HTTP web dir:                        /usr/local/share/lgraph/browser-resource
  RPC enable:                          1
  RPC port:                            9090
  SSL enable:                          0
  Whether the token is unlimited:      0
  audit log enable:                    0
  bind host:                           0.0.0.0
  bolt port:                           7687
  disable auth:                        0
  durable:                             0
  log dir:                             ""
  log verbose:                         1
  number of bolt io threads:           1
  optimistic transaction:              0
  reset admin password if you forget:  0
  subprocess idle limit:               600
  thread limit:                        0
[20240903 10:08:07.325383 0x00007f59380569c0 INFO  src/server/lgraph_server.h:78] [StateMachine] Builtin services are disabled according to ServerOptions.has_builtin_services
[20240903 10:08:07.325931 0x00007f59380569c0 INFO  src/server/lgraph_server.cpp:268] Listening for RPC on port 9090
[20240903 10:08:07.330379 0x00007f59380569c0 INFO  src/restful/server/rest_server.cpp:479] Listening for REST on port 7070
[20240903 10:08:07.330909 0x00007b58c6dff700 WARN  src/server/bolt_server.cpp:41] bolt server expection: bind: Address already in use
[20240903 10:08:07.331030 0x00007f59380569c0 INFO  src/server/lgraph_server.cpp:328] Stopping TuGraph...
[20240903 10:08:07.831321 0x00007f59380569c0 INFO  src/restful/server/rest_server.cpp:494] REST server stopped.
[20240903 10:08:07.831827 0x00007f59380569c0 INFO  src/server/bolt_server.cpp:60] bolt server stopped.
[20240903 10:08:07.833198 0x00007f59380569c0 INFO  src/server/lgraph_server.cpp:363] Server shutdown.
root@node11:/usr/local/bin# vi /usr/local/etc/lgraph.json 
{
    "directory" : "/var/lib/lgraph/data",
    "host" : "0.0.0.0",
    "port" : 7070,
    "rpc_port" : 9090,
    "enable_rpc" : true,
    "bolt_port": 7688,
    "enable_ha" : false,
    "verbose" : 1,
    "log_dir" : "/var/log/lgraph_log",
    "disable_auth" : false,
    "ssl_auth" : false,
    "server_key" : "/usr/local/etc/lgraph/server-key.pem",
    "server_cert" : "/usr/local/etc/lgraph/server-cert.pem",
    "web" : "/usr/local/share/lgraph/browser-resource"
}
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/usr/local/etc/lgraph.json" 16L, 470C written                                                                                  
root@node11:/usr/local/bin# ./lgraph_server --log_dir ""
[20240903 10:09:45.704956 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:166] 
**********************************************************************
*                  TuGraph Graph Database v4.3.2                     *
*                                                                    *
*    Copyright(C) 2018-2023 Ant Group. All rights reserved.          *
*                                                                    *
**********************************************************************
Server is configured with the following parameters:
  Backup log enable:                   0
  DB directory:                        /var/lib/lgraph/data
  HA enable:                           0
  HTTP port:                           7070
  HTTP web dir:                        /usr/local/share/lgraph/browser-resource
  RPC enable:                          1
  RPC port:                            9090
  SSL enable:                          0
  Whether the token is unlimited:      0
  audit log enable:                    0
  bind host:                           0.0.0.0
  bolt port:                           7688
  disable auth:                        0
  durable:                             0
  log dir:                             ""
  log verbose:                         1
  number of bolt io threads:           1
  optimistic transaction:              0
  reset admin password if you forget:  0
  subprocess idle limit:               600
  thread limit:                        0
[20240903 10:09:45.721931 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.h:78] [StateMachine] Builtin services are disabled according to ServerOptions.has_builtin_services
[20240903 10:09:45.722554 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:268] Listening for RPC on port 9090
[20240903 10:09:45.726814 0x00007f8df37cf9c0 INFO  src/restful/server/rest_server.cpp:479] Listening for REST on port 7070
[20240903 10:09:45.727607 0x00007b8d823ff700 INFO  src/server/bolt_server.cpp:36] bolt server run
[20240903 10:09:45.727790 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:302] Server started.
[20240903 10:12:40.973031 0x00007b8d763ff700 ERROR src/server/bolt_handler.cpp:179] [InputError] Graph name cannot be empty.
[20240903 10:12:41.006877 0x00007b8d763ff700 ERROR src/server/bolt_handler.cpp:179] [CypherException] CypherException: graph name cannot be empty
[20240903 10:13:45.363066 0x00007b8d7537f700 ERROR src/server/bolt_handler.cpp:179] [InputError] Graph name cannot be empty.
[20240903 10:13:45.383480 0x00007b8d7537f700 ERROR src/server/bolt_handler.cpp:179] [CypherException] CypherException: graph name cannot be empty
[20240903 10:14:45.349728 0x00007b8d7537f700 ERROR src/server/bolt_handler.cpp:179] [InputError] Graph name cannot be empty.
[20240903 10:14:45.376223 0x00007b8d7537f700 ERROR src/server/bolt_handler.cpp:179] [CypherException] CypherException: graph name cannot be empty
[20240903 10:15:02.511537 0x00007b8d763ff700 ERROR src/server/bolt_handler.cpp:179] [InputError] Graph name cannot be empty.
[20240903 10:15:02.536370 0x00007b8d763ff700 ERROR src/server/bolt_handler.cpp:179] [CypherException] CypherException: graph name cannot be empty
^C[20240903 10:16:32.708260 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:47] !!!!! Received signal 2, exiting... !!!!!
[20240903 10:16:32.708413 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:328] Stopping TuGraph...
[20240903 10:16:33.209252 0x00007f8df37cf9c0 INFO  src/restful/server/rest_server.cpp:494] REST server stopped.
[20240903 10:16:33.210766 0x00007f8df37cf9c0 INFO  src/server/bolt_server.cpp:60] bolt server stopped.
[20240903 10:16:33.213215 0x00007f8df37cf9c0 INFO  src/server/lgraph_server.cpp:363] Server shutdown.
root@node11:/usr/local/bin# lgraph_server -d start
Starting lgraph...
The service process is started at pid 826145.
root@node11:/usr/local/bin# cd /var/log/lgraph_log
root@node11:/var/log/lgraph_log# ll
total 20
drwxrwxrwx  2 root root   4096 9月   3 10:16 ./
drwxrwxr-x 18 root syslog 4096 9月   3 10:06 ../
-rw-rw-rw-  1 root root   2488 9月   3 10:06 lgraph_20240903_100636302743.log
-rw-r--r--  1 root root   2488 9月   3 10:07 lgraph_20240903_100735575100.log
-rw-rw-rw-  1 root root   2131 9月   3 10:16 lgraph_20240903_101635697666.log
root@node11:/var/log/lgraph_log# ls -lt
total 12
-rw-rw-rw- 1 root root 2131 9月   3 10:16 lgraph_20240903_101635697666.log
-rw-r--r-- 1 root root 2488 9月   3 10:07 lgraph_20240903_100735575100.log
-rw-rw-rw- 1 root root 2488 9月   3 10:06 lgraph_20240903_100636302743.log
root@node11:/var/log/lgraph_log# tail -f lgraph_20240903_101635697666.log 
  number of bolt io threads:           1
  optimistic transaction:              0
  reset admin password if you forget:  0
  subprocess idle limit:               600
  thread limit:                        0
[20240903 10:16:35.716610 0x00007f28c020b9c0 INFO  src/server/lgraph_server.h:78] [StateMachine] Builtin services are disabled according to ServerOptions.has_builtin_services
[20240903 10:16:35.717219 0x00007f28c020b9c0 INFO  src/server/lgraph_server.cpp:268] Listening for RPC on port 9090
[20240903 10:16:35.722184 0x00007f28c020b9c0 INFO  src/restful/server/rest_server.cpp:479] Listening for REST on port 7070
[20240903 10:16:35.722697 0x00007a284e3ff700 INFO  src/server/bolt_server.cpp:36] bolt server run
[20240903 10:16:35.722802 0x00007f28c020b9c0 INFO  src/server/lgraph_server.cpp:302] Server started.

http://192.168.207.11:7070/

bolt://192.168.207.11:7688

7688为避免冲突修改的端口,原先是7687

初始账号密码:

账号:admin

密码:73@TuGraph

相关推荐
紅色彼岸花5 分钟前
第六章:DNS域名解析服务器
运维·服务器
Spring_java_gg9 分钟前
如何抵御 Linux 服务器黑客威胁和攻击
linux·服务器·网络·安全·web安全
✿ ༺ ོIT技术༻9 分钟前
Linux:认识文件系统
linux·运维·服务器
会掉头发37 分钟前
Linux进程通信之共享内存
linux·运维·共享内存·进程通信
我言秋日胜春朝★40 分钟前
【Linux】冯诺依曼体系、再谈操作系统
linux·运维·服务器
饮啦冰美式1 小时前
22.04Ubuntu---ROS2使用rclcpp编写节点
linux·运维·ubuntu
wowocpp1 小时前
ubuntu 22.04 server 安装 和 初始化 LTS
linux·运维·ubuntu
wowocpp1 小时前
ubuntu 22.04 server 格式化 磁盘 为 ext4 并 自动挂载 LTS
服务器·数据库·ubuntu
Huaqiwill1 小时前
Ubuntun搭建并行计算环境
linux·云计算