安装

   1  ifconfig 
    2  cd /kingbase/
    3  ls -l
    4  cd
    5  ifconfig 
    6  exit
    7  cd /home/kingbase/install/
    8  ls -l
    9  
   10  
   11  tar -xvf KingbaseES_V008R003C002B0200_Mips64_install.tar.gz 
   12  ll
   13  ls -l
   14  cd KingbaseES_V008R003C002B0200_Mips64_install/
   15  ls -l
   16  ./setup.sh 
   17  ls -l
   18  bash setup.sh -i console
   19  vim /etc/sysctl.conf 
   20  vim /etc/security/limits.conf 
   21  exit
   22  ksql -USYSTEM -W123456 -dtest
   23  cd /home/kingbase/install/
   24  ls -l
   25  mv license.dat license.dat_old
   26  ls -l
   27  rz
   28  ls -l
   29  find . -name license.dat
   30  cd /
   31  find . -name license.dat
   32  cd /home/kingbase/
   33  find . -name license.dat
   34  cd /home/kingbase/install/
   35  ls -l
   36  cd /home/kingbase/KingbaseES/
   37  ls -l
   38  mv license.dat license.dat_old
   39  pwd
   40  cd ..
   41  cd install/
   42  cp license.dat /home/kingbase/KingbaseES/
   43  cd ..
   44  cd KingbaseES/
   45  ls -l
   46  cd ..
   47  cd cluster/
   48  ls -l
   49  mv license.dat license.dat_old
   50  cd ..
   51  cd install/
   52  cp license.dat /home/kingbase/cluster/
   53  chown kingbase:kingbase license.dat
   54  cd ..
   55  cd KingbaseES/
   56  chown kingbase:kingbase license.dat
   57  cd ..
   58  cd cluster/
   59  chown kingbase:kingbase license.dat
   60  ksql -USYSTEM -W123456 -dtest
   61  exit
   62  ksql -USYSTEM -W123456 -dtest
   63  cd /home/kingbase/
   64  find . -name license.dat
   65  ps -ef|grep kingbase
   66  kill -1 kingbase 25159
   67  kill -1 25159
   68  ps -ef|grep kingbase
   69  ksql -USYSTEM -W123456 -dtest
   70  ifconfig
   71  history 
kingbase@node158:~$ df -h
文件系统        容量  已用  可用 已用% 挂载点
udev             32G     0   32G    0% /dev
tmpfs           6.4G  5.5M  6.4G    1% /run
/dev/sdd3        94G  6.7G   82G    8% /
tmpfs            32G   21M   32G    1% /dev/shm
tmpfs           5.0M   16K  5.0M    1% /run/lock
tmpfs            32G     0   32G    0% /sys/fs/cgroup
/dev/sdd2       1.5G   49M  1.4G    4% /boot
/dev/sdd5        29G  8.1G   19G   30% /recovery
/dev/sdd1       300M  6.5M  293M    3% /boot/efi
/dev/sdd4       329G   34G  279G   11% /data
tmpfs           6.4G  160K  6.4G    1% /run/user/0
/dev/sr0        292K  292K     0  100% /media/root/BlackCube
tmpfs           6.4G     0  6.4G    0% /run/user/1001
kingbase@node158:~$ cd /home/kingbase/KingbaseES/
kingbase@node158:~/KingbaseES$ ls -l
总用量 112
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
drwx------ 21 kingbase kingbase  4096 5月  19 15:31 data
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
kingbase@node158:~/KingbaseES$ sys_ctl -Ddata stop
等待服务器进程关闭 .... 完成
服务器进程已经关闭
kingbase@node158:~/KingbaseES$ ps -ef|grep kingbase
kingbase 25093     1  0 15:31 ?        00:00:00 /lib/systemd/systemd --user
kingbase 25094 25093  0 15:31 ?        00:00:00 (sd-pam)
root     27830 20542  0 15:46 pts/5    00:00:00 su kingbase
kingbase 27831 27830  0 15:46 pts/5    00:00:00 bash
kingbase 27969 27831  0 15:57 pts/5    00:00:00 ps -ef
kingbase 27970 27831  0 15:57 pts/5    00:00:00 grep kingbase
kingbase@node158:~/KingbaseES$ cp -r data data_bak
kingbase@node158:~/KingbaseES$ ls -l
总用量 116
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
drwx------ 21 kingbase kingbase  4096 5月  19 15:57 data
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
kingbase@node158:~/KingbaseES$ mv data data_old
kingbase@node158:~/KingbaseES$ ls -l
总用量 116
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwx------ 21 kingbase kingbase  4096 5月  19 15:57 data_old
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
kingbase@node158:~/KingbaseES$ mv data_old data
kingbase@node158:~/KingbaseES$ mv data /data
mv: 无法创建目录 '/data/data': 权限不够
kingbase@node158:~/KingbaseES$ exit
exit
root@node158:/home/kingbase/cluster/KingbaseCluster/db/bin# df -h
文件系统        容量  已用  可用 已用% 挂载点
udev             32G     0   32G    0% /dev
tmpfs           6.4G  5.5M  6.4G    1% /run
/dev/sdd3        94G  6.7G   82G    8% /
tmpfs            32G   21M   32G    1% /dev/shm
tmpfs           5.0M   16K  5.0M    1% /run/lock
tmpfs            32G     0   32G    0% /sys/fs/cgroup
/dev/sdd2       1.5G   49M  1.4G    4% /boot
/dev/sdd5        29G  8.1G   19G   30% /recovery
/dev/sdd1       300M  6.5M  293M    3% /boot/efi
/dev/sdd4       329G   34G  279G   11% /data
tmpfs           6.4G  160K  6.4G    1% /run/user/0
/dev/sr0        292K  292K     0  100% /media/root/BlackCube
root@node158:/home/kingbase/cluster/KingbaseCluster/db/bin# cd /home/kingbase/KingbaseES/
root@node158:/home/kingbase/KingbaseES# ls -l
总用量 116
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
drwx------ 21 kingbase kingbase  4096 5月  19 15:57 data
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
root@node158:/home/kingbase/KingbaseES# mv data /data
root@node158:/home/kingbase/KingbaseES# ln -s /data/data /home/kingbase/KingbaseES/
root@node158:/home/kingbase/KingbaseES# ls -l
总用量 112
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
lrwxrwxrwx  1 root     root        10 5月  19 16:00 data -> /data/data
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
root@node158:/home/kingbase/KingbaseES# su kingbase
kingbase@node158:~/KingbaseES$ sys_ctl start -Ddata
正在启动服务器进程
kingbase@node158:~/KingbaseES$ 2021-05-19 16:02:09 CST process_id=28054,user=,db=,client= LOG:  redirecting log output to logging collector process
2021-05-19 16:02:09 CST process_id=28054,user=,db=,client= HINT:  Future log output will appear in directory "sys_log".

kingbase@node158:~/KingbaseES$ ls -l
总用量 112
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
lrwxrwxrwx  1 root     root        10 5月  19 16:00 data -> /data/data
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
kingbase@node158:~/KingbaseES$ ksql -USYSTEM -W123456 -dtest
ksql (V008R003C002B0200)
Type "help" for help.

test=# \l
                               List of databases
   Name    | Owner  | Encoding |   Collate   |    Ctype    | Access privileges  
-----------+--------+----------+-------------+-------------+--------------------
 SAMPLES   | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | 
 TEMPLATE0 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/SYSTEM         +
           |        |          |             |             | SYSTEM=CTcb/SYSTEM
 TEMPLATE1 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/SYSTEM         +
           |        |          |             |             | SYSTEM=CTcb/SYSTEM
 TEMPLATE2 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/SYSTEM        +
           |        |          |             |             | SYSTEM=CTcb/SYSTEM
 TEST      | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | 
(5 rows)

test=# \q
kingbase@node158:~/KingbaseES$ cd /home/kingbase
kingbase@node158:~$ ls -l
总用量 36
drwxr-xr-x  3 kingbase root     4096 5月  19 15:41 cluster
drwxr-xr-x  2 kingbase kingbase 4096 12月 17 23:08 Desktop
drwxr-xr-x  2 kingbase kingbase 4096 12月 17 23:08 Documents
drwxr-xr-x  2 kingbase kingbase 4096 12月 17 23:08 Downloads
drwxr-xr-x  3 kingbase kingbase 4096 5月  19 15:35 install
drwxr-x--x 21 kingbase kingbase 4096 5月  19 16:00 KingbaseES
drwxr-xr-x  2 kingbase kingbase 4096 12月 17 23:05 Music
drwxr-xr-x  3 kingbase kingbase 4096 12月 17 23:08 Pictures
drwxr-xr-x  2 kingbase kingbase 4096 12月 17 23:08 Videos
kingbase@node158:~$ cd KingbaseES/
kingbase@node158:~/KingbaseES$ ls -l
总用量 112
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Cluster
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ConsoleTools
-rw-------  1 kingbase kingbase   108 5月  19 15:48 control.so
lrwxrwxrwx  1 root     root        10 5月  19 16:00 data -> /data/data
drwx------ 21 kingbase kingbase  4096 5月  19 15:58 data_bak
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 DeployTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:12 desktops
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 DtsTools
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Help
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Jdbc
drwxr-x---  6 kingbase kingbase  4096 5月  19 15:12 jre
-rw-r--r--  1 kingbase kingbase  3252 5月  19 15:48 license.dat
-rwxr-x---  1 kingbase kingbase  3097 5月  19 15:31 license.dat_old
-rwxr-x---  1 kingbase kingbase 11198 8月  23  2019 LICENSE_EN
-rwxr-x---  1 kingbase kingbase 10366 8月  23  2019 LICENSE_ZH
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:14 Logs
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 ManagerTools
drwxrwxr-x  5 kingbase kingbase  4096 5月  19 15:12 Odbc
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 Perl
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 Php
drwxrwxr-x  4 kingbase kingbase  4096 5月  19 15:12 ReplicationTools
drwxr-x---  2 kingbase kingbase  4096 5月  19 15:14 Scripts
drwxrwxr-x  6 kingbase kingbase  4096 5月  19 15:12 Server
drwxrwxr-x  2 kingbase kingbase  4096 5月  19 15:12 template
drwxr-x---  5 kingbase kingbase  4096 5月  19 15:14 Uninstall
kingbase@node158:~/KingbaseES$ cd /data
kingbase@node158:/data$ ll
bash: ll:未找到命令
kingbase@node158:/data$ ls -l
总用量 48
drwxr-xr-x  3 root     root      4096 5月  19 11:33 beifen
drwxr-xr-x 15 root     root      4096 5月  18 14:43 BES952
drwx------ 21 kingbase kingbase  4096 5月  19 16:02 data
drwxr-xr-x  4 root     root      4096 12月 30 13:32 home
drwx------  2 root     root     16384 12月 17 23:01 lost+found
drwxr-xr-x  2 root     root      4096 11月 20 15:41 opt
drwx------ 23 root     root      4096 5月  19 15:30 root
drwxr-xr-x  4 root     root      4096 5月  19 13:55 seeyon
drwxr-xr-x 12 root     root      4096 11月 19 21:04 var
kingbase@node158:/data$ cd data/
kingbase@node158:/data/data$ ls -l
总用量 132
drwx------ 2 kingbase kingbase  4096 5月  19 15:31 audit
drwx------ 7 kingbase kingbase  4096 5月  19 15:14 base
drwx------ 2 kingbase kingbase  4096 5月  19 16:02 global
-rw------- 1 kingbase kingbase    88 5月  19 15:14 kingbase.auto.conf
-rw------- 1 kingbase kingbase 24827 5月  19 15:30 kingbase.conf
-rw------- 1 kingbase kingbase    58 5月  19 16:02 kingbase.opts
-rw------- 1 kingbase kingbase    81 5月  19 16:02 kingbase.pid
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_clog
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_commit_ts
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_dynshmem
-rw------- 1 kingbase kingbase  4357 5月  19 15:14 sys_hba.conf
-rw------- 1 kingbase kingbase  1628 5月  19 15:14 sys_ident.conf
drwx------ 2 kingbase kingbase  4096 5月  19 16:02 sys_log
drwx------ 4 kingbase kingbase  4096 5月  19 15:14 sys_logical
drwx------ 4 kingbase kingbase  4096 5月  19 15:14 sys_multixact
drwx------ 2 kingbase kingbase  4096 5月  19 16:02 sys_notify
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_replslot
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_serial
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_snapshots
drwx------ 2 kingbase kingbase  4096 5月  19 16:02 sys_stat
drwx------ 2 kingbase kingbase  4096 5月  19 16:04 sys_stat_tmp
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_subtrans
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_tblspc
drwx------ 2 kingbase kingbase  4096 5月  19 15:14 sys_twophase
-rw------- 1 kingbase kingbase     9 5月  19 15:14 SYS_VERSION
drwx------ 3 kingbase kingbase  4096 5月  19 15:14 sys_xlog
kingbase@node158:/data/data$ cd /home/kingbase/cluster/KingbaseCluster/db/kb_scripts/kb_backup/
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup$ cd logical/
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup/logical$ ls -l
总用量 20
-rwxr-xr-x 1 kingbase kingbase 4972 12月  3 16:29 backup8_check.sh
-rwxr-xr-x 1 kingbase kingbase  186 12月  3 16:29 backup8.conf
-rwxr-xr-x 1 kingbase kingbase 3796 12月  3 16:29 backup8.sh
-rwxr-xr-x 1 kingbase kingbase 3449 12月  3 16:29 fast_deploy_backup8.sh
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup/logical$ vim backup8.sh 
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup/logical$ vim backup8.conf 
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup/logical$ ps -ef |grep kingbase
root     28042 20542  0 16:01 pts/5    00:00:00 su kingbase
kingbase 28043 28042  0 16:01 pts/5    00:00:00 bash
kingbase 28054     1  0 16:02 pts/5    00:00:00 /home/kingbase/KingbaseES/Server/bin/kingbase -D data
kingbase 28055 28054  0 16:02 ?        00:00:00 kingbase: logger process   
kingbase 28057 28054  0 16:02 ?        00:00:00 kingbase: checkpointer process   
kingbase 28058 28054  0 16:02 ?        00:00:00 kingbase: writer process   
kingbase 28059 28054  0 16:02 ?        00:00:00 kingbase: wal writer process   
kingbase 28060 28054  0 16:02 ?        00:00:00 kingbase: autovacuum launcher process   
kingbase 28061 28054  0 16:02 ?        00:00:00 kingbase: stats collector process   
kingbase 28062 28054  0 16:02 ?        00:00:00 kingbase: bgworker: syslogical supervisor   
kingbase 28643 28043  0 16:44 pts/5    00:00:00 ps -ef
kingbase 28644 28043  0 16:44 pts/5    00:00:00 grep kingbase
kingbase@node158:~/cluster/KingbaseCluster/db/kb_scripts/kb_backup/logical$ 

排错

root@user-PC:~# ps -ef | grep kingbase
kingbase  2497  9764  0 4月22 ?       00:05:26 kingbase: wal sender process SYSTEM 10.173.203.152(63500) streaming 7/48651310
root      2515 10173  0 4月22 ?       00:00:37 kingbasecluster: PCP: wait for connection request
root      2516 10173  0 4月22 ?       00:00:02 kingbasecluster: worker process
kingbase  2699     1  0 3月05 ?       00:04:54 /lib/systemd/systemd --user
kingbase  2700  2699  0 3月05 ?       00:00:00 (sd-pam)
kingbase  2734     1  0 3月05 ?       00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
kingbase  2737  2678  0 3月05 ?       00:21:12 /usr/bin/startdde
kingbase  2749  2699  0 3月05 ?       00:04:08 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
kingbase  2802     1  0 3月05 ?       00:00:04 /usr/bin/fcitx -d
kingbase  2808     1  0 3月05 ?       00:00:03 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --config-file /usr/share/fcitx/dbus/daemon.conf
kingbase  2812     1  0 3月05 ?       00:00:00 /usr/bin/fcitx-dbus-watcher unix:abstract=/tmp/dbus-ysA3B1gvAm,guid=7d59eec5831b4da57476b5ce6041ad23 2808
kingbase  2822  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfsd
kingbase  2827  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1001/gvfs -f -o big_writes
kingbase  2875  2699  0 3月05 ?       00:00:18 /usr/bin/pulseaudio --daemonize=no
kingbase  2916  2737  0 3月05 ?       01:05:08 /usr/lib/deepin-daemon/dde-osd
kingbase  2917  2737  0 3月05 ?       00:00:00 /bin/sh /usr/bin/kwin_no_scale
kingbase  2921  2917  0 3月05 ?       00:00:14 kwin_x11 -platform dde-kwin-xcb:appFilePath=/usr/bin/kwin_no_scale
kingbase  2947  2699  0 3月05 ?       00:00:01 /usr/bin/deepin-wm-dbus
kingbase  3000  2699  0 3月05 ?       00:00:00 /usr/lib/dconf/dconf-service
kingbase  3038  2699  0 3月05 ?       00:00:00 /usr/lib/bluetooth/obexd
kingbase  3039  2699  0 3月05 ?       00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
kingbase  3045  2699  0 3月05 ?       00:00:01 /usr/bin/kglobalaccel5
kingbase  3046  3039  0 3月05 ?       00:00:01 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
kingbase  3048  2699  0 3月05 ?       00:00:01 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
kingbase  3076  2737  0 3月05 ?       01:52:22 /usr/lib/deepin-daemon/dde-session-daemon
kingbase  3110  2737  0 3月05 ?       01:50:20 /usr/bin/dde-dock
kingbase  3130  2737  0 3月05 ?       00:17:04 /usr/bin/dde-desktop
kingbase  3167  2699  0 3月05 ?       00:00:02 /usr/lib/mips64el-linux-gnuabi64/bamf/bamfdaemon
kingbase  3216  2737  0 3月05 ?       00:15:51 /usr/bin/dde-file-manager -d
kingbase  3217  2737  0 3月05 ?       00:01:46 /usr/lib/polkit-1-dde/dde-polkit-agent
kingbase  3227  2699  0 3月05 ?       00:11:39 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
kingbase  3235  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
kingbase  3239  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
kingbase  3245  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
kingbase  3249  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
kingbase  3313  2737  0 3月05 ?       00:01:57 /usr/bin/dde-shutdown -d
kingbase  3327  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3336  2737  0 3月05 ?       00:24:31 /usr/lib/deepin-deepinid-daemon/deepin-deepinid-daemon
kingbase  3338  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3340  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3350  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3352  2737  0 3月05 ?       00:00:00 /usr/lib/geoclue-2.0/demos/agent
kingbase  3353  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3360  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3368  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3371  2737  0 3月05 ?       00:01:38 /usr/bin/dde-clipboard
kingbase  3372  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3377  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3380  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3386  2737  0 3月05 ?       00:00:01 dde-printer-helper
kingbase  3488     1  0 3月05 ?       00:00:01 /usr/bin/dde-clipboardloader
kingbase  3700  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3812  2699  0 3月05 ?       00:00:00 /usr/bin/dman-search
kingbase  3830  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  3831  2737  0 3月05 ?       00:22:41 /usr/bin/dde-launcher
kingbase  3964  2699  0 3月05 ?       00:00:25 /usr/bin/uos-activator
kingbase  3985  2734  0 3月05 ?       00:00:00 /usr/bin/ssh-agent -D -a /run/user/1001/keyring/.ssh
kingbase  4105  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  4106  2737  0 3月05 ?       00:00:18 /usr/bin/python3 /usr/share/system-config-printer/applet.py
kingbase  4107  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  6016  2699  1 3月05 ?       18:54:50 /usr/bin/dde-lock
kingbase  8205  9764  0 11:49 ?        00:00:34 kingbase: OAUSER OA 10.173.203.130(57390) idle
kingbase  8206  9764  0 11:49 ?        00:00:38 kingbase: OAUSER OA 10.173.203.130(57392) idle
kingbase  8212  9764  0 11:49 ?        00:00:35 kingbase: OAUSER OA 10.173.203.130(57406) idle
kingbase  8213  9764  0 11:49 ?        00:00:36 kingbase: OAUSER OA 10.173.203.130(57408) idle
kingbase  8214  9764  0 11:49 ?        00:00:37 kingbase: OAUSER OA 10.173.203.130(57410) idle
kingbase  8537  2737  0 3月05 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase  8625  2699  0 3月05 ?       00:00:00 /usr/lib/gvfs/gvfsd-metadata
kingbase  9764     1  0 4月20 ?       01:16:29 /home/kingbase/cluster/cluster/db/bin/kingbase -D /home/kingbase/cluster/cluster/db/data
kingbase  9765  9764  0 4月20 ?       00:18:57 kingbase: logger process   
kingbase  9770  9764  0 4月20 ?       01:09:28 kingbase: checkpointer process   
kingbase  9771  9764  0 4月20 ?       00:42:03 kingbase: writer process   
kingbase  9772  9764  0 4月20 ?       00:16:00 kingbase: stats collector process   
root     10173     1  0 4月20 ?       00:54:00 ./kingbasecluster -n
root     10207 10173  0 4月20 ?       00:03:47 kingbasecluster: watchdog
root     10233 10173  0 4月20 ?       00:15:40 kingbasecluster: lifecheck
root     10235 10233  0 4月20 ?       00:02:55 kingbasecluster: heartbeat receiver
root     10236 10233  0 4月20 ?       00:07:07 kingbasecluster: heartbeat sender
kingbase 10867  9764  0 5月18 ?       00:00:06 kingbase: OAUSER OA 10.173.203.132(53182) idle
kingbase 10868  9764  0 5月18 ?       00:00:04 kingbase: OAUSER OA 10.173.203.132(53184) idle
kingbase 10869  9764  0 5月18 ?       00:00:06 kingbase: OAUSER OA 10.173.203.132(53186) idle
kingbase 10881  9764  0 5月18 ?       00:00:04 kingbase: OAUSER OA 10.173.203.132(53210) idle
kingbase 10882  9764  0 5月18 ?       00:00:04 kingbase: OAUSER OA 10.173.203.132(53212) idle
kingbase 10883  9764  0 5月18 ?       00:00:04 kingbase: OAUSER OA 10.173.203.132(53214) idle
kingbase 10884  9764  0 5月18 ?       00:00:06 kingbase: OAUSER OA 10.173.203.132(53216) idle
kingbase 10885  9764  0 5月18 ?       00:00:06 kingbase: OAUSER OA 10.173.203.132(53218) idle
root     13874 10173  0 16:50 ?        00:00:00 kingbasecluster: wait for connection request
root     14622 10173  0 16:52 ?        00:00:00 kingbasecluster: wait for connection request
kingbase 15002  2737  0 4月21 ?       00:00:00 [deepin-turbo-in] <defunct>
kingbase 15003  2737  1 4月21 ?       10:22:27 deepin-terminal
kingbase 15019 15003  0 4月21 pts/3   00:00:00 /bin/bash
root     15073 10173  0 16:53 ?        00:00:00 kingbasecluster: wait for connection request
root     15074 10173  0 16:53 ?        00:00:00 kingbasecluster: wait for connection request
root     16366 10173  0 16:56 ?        00:00:00 kingbasecluster: wait for connection request
root     16909 10173  0 16:57 ?        00:00:00 kingbasecluster: wait for connection request
root     17341 10173  0 16:58 ?        00:00:00 kingbasecluster: wait for connection request
root     17346 10173  0 16:58 ?        00:00:00 kingbasecluster: wait for connection request
root     17642 10173  0 16:59 ?        00:00:00 kingbasecluster: wait for connection request
root     17646 10173  0 16:59 ?        00:00:00 kingbasecluster: wait for connection request
kingbase 18148  6016  0 4月21 ?       00:00:01 /usr/bin/python3 /usr/bin/onboard -e --layout Small --size 60x5 -a
root     18208 10173  0 17:00 ?        00:00:00 kingbasecluster: wait for connection request
root     18524 10173  0 17:01 ?        00:00:00 kingbasecluster: wait for connection request
root     18701 10173  0 17:01 ?        00:00:00 kingbasecluster: wait for connection request
root     19062 10173  0 17:02 ?        00:00:00 kingbasecluster: wait for connection request
root     19170 10173  0 17:02 ?        00:00:00 kingbasecluster: wait for connection request
root     19849 19797  0 17:03 pts/7    00:00:00 grep kingbase
kingbase 30548  9764  0 4月28 ?       00:02:12 kingbase: OAUSER OA 10.173.203.131(45274) idle
kingbase 30549  9764  0 4月28 ?       00:02:09 kingbase: OAUSER OA 10.173.203.131(45276) idle
kingbase 30550  9764  0 4月28 ?       00:01:21 kingbase: OAUSER OA 10.173.203.131(45278) idle
kingbase 30551  9764  0 4月28 ?       00:01:23 kingbase: OAUSER OA 10.173.203.131(45280) idle
kingbase 30552  9764  0 4月28 ?       00:02:08 kingbase: OAUSER OA 10.173.203.131(45282) idle
kingbase 30553  9764  0 4月28 ?       00:01:23 kingbase: OAUSER OA 10.173.203.131(45284) idle
kingbase 30554  9764  0 4月28 ?       00:01:19 kingbase: OAUSER OA 10.173.203.131(45286) idle
kingbase 30563  9764  0 4月28 ?       00:01:21 kingbase: OAUSER OA 10.173.203.131(45304) idle
kingbase 30564  9764  0 4月28 ?       00:02:08 kingbase: OAUSER OA 10.173.203.131(45306) idle
kingbase 30742  9764  0 4月22 ?       00:09:30 kingbase: wal writer process   
kingbase 30743  9764  0 4月22 ?       00:02:23 kingbase: autovacuum launcher process   
kingbase 30744  9764  0 4月22 ?       00:00:13 kingbase: archiver process   last was 000000030000000700000047
kingbase 30745  9764  0 4月22 ?       00:00:01 kingbase: bgworker: syslogical supervisor   
root     30949 10173  0 4月22 ?       00:00:00 kingbasecluster: SYSTEM TEST  idle
kingbase 31435  9764  0 4月22 ?       00:05:42 kingbase: wal sender process SYSTEM 10.173.203.156(23042) streaming 7/48651310
kingbase 31436  9764  0 4月22 ?       00:05:23 kingbase: wal sender process SYSTEM 10.173.203.154(23656) streaming 7/48651310
root     31846  5576  0 4月22 pts/0   00:00:00 su - kingbase
kingbase 31847 31846  0 4月22 pts/0   00:00:00 -bash
kingbase 31907 31847  0 4月22 pts/0   00:00:00 ./ksql -USYSTEM -W123456 TEST -p9999
kingbase 31908  9764  0 4月22 ?       00:00:00 kingbase: SYSTEM TEST 10.173.203.150(14366) idle
root@user-PC:~# ./^Cql -USYSTEM -W123456 -p9999 test
root@user-PC:~# ^C
root@user-PC:~# su - kingbase
kingbase@user-PC:~$ ksql -USYSTEM -W123456 TEST 
-bash: ksql:未找到命令
kingbase@user-PC:~$ cd /home/kingbase/cluster/cluster/db/bin/
kingbase@user-PC:~/cluster/cluster/db/bin$ ./ksql -USYSTEM -W123456 TEST 
ksql (V008R003C002B0200)
Type "help" for help.

TEST=# select * from sys_stat_replication;
  pid  | usesysid | usename | application_name |  client_addr   | client_hostname | client_port |         backend_start         | backend_xmin |   state   | sent_locati
on | write_location | flush_location | replay_location | sync_priority | sync_state 
-------+----------+---------+------------------+----------------+-----------------+-------------+-------------------------------+--------------+-----------+------------
---+----------------+----------------+-----------------+---------------+------------
 31435 |       10 | SYSTEM  | node4            | 10.173.203.156 |                 |       23042 | 2021-04-22 11:35:21.810773+08 |              | streaming | 7/486C2690 
   | 7/486C2690     | 7/486C2690     | 7/486C2618      |             4 | potential
 31436 |       10 | SYSTEM  | node3            | 10.173.203.154 |                 |       23656 | 2021-04-22 11:35:22.326264+08 |              | streaming | 7/486C2690 
   | 7/486C2690     | 7/486C2690     | 7/486C2618      |             3 | potential
  2497 |       10 | SYSTEM  | node2            | 10.173.203.152 |                 |       63500 | 2021-04-22 11:43:18.491188+08 |              | streaming | 7/486C2690 
   | 7/486C2690     | 7/486C2690     | 7/486C2618      |             2 | sync
(3 rows)

TEST=# \q
kingbase@user-PC:~/cluster/cluster/db/bin$ ./ksql -USYSTEM -W123456 -dTEST -h 10.173.203.158
ksql (V008R003C002B0200)
Type "help" for help.

TEST=# select * from sys_stat_replication;
 pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_location | write_location | flu
sh_location | replay_location | sync_priority | sync_state 
-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+--------------+-------+---------------+----------------+----
------------+-----------------+---------------+------------
(0 rows)

TEST=# 
TEST=# \l+
                                                                 List of databases
   Name    | Owner  | Encoding |   Collate   |    Ctype    | Access privileges  | Size  | Tablespace  |                Description                 
-----------+--------+----------+-------------+-------------+--------------------+-------+-------------+--------------------------------------------
 SAMPLES   | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                    | 13 MB | SYS_DEFAULT | 
 TEMPLATE0 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/SYSTEM         +| 10 MB | SYS_DEFAULT | unmodifiable empty database
           |        |          |             |             | SYSTEM=CTcb/SYSTEM |       |             | 
 TEMPLATE1 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/SYSTEM         +| 10 MB | SYS_DEFAULT | default template for new databases
           |        |          |             |             | SYSTEM=CTcb/SYSTEM |       |             | 
 TEMPLATE2 | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/SYSTEM        +| 10 MB | SYS_DEFAULT | 
           |        |          |             |             | SYSTEM=CTcb/SYSTEM |       |             | 
 TEST      | SYSTEM | UTF8     | zh_CN.UTF-8 | zh_CN.UTF-8 |                    | 10 MB | SYS_DEFAULT | default administrative connection database
(5 rows)

TEST=# \q