GBase 8c 学习笔记 003 —— GBase 8c 安装实操
检查配置
硬件配置
- CPU
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | [root@192 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 2 座: 2 NUMA 节点: 1 厂商 ID: GenuineIntel CPU 系列: 6 型号: 158 型号名称: Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz 步进: 13 CPU MHz: 3000.001 BogoMIPS: 6000.00 超管理器厂商: VMware 虚拟化类型: 完全 L1d 缓存: 32K L1i 缓存: 32K L2 缓存: 256K L3 缓存: 12288K NUMA 节点0 CPU: 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflu sh mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc _reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt t sc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflu shopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities |
- 查看内存
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | [root@192 ~]# cat /proc/meminfo MemTotal: 10054444 kB MemFree: 8312168 kB MemAvailable: 8731304 kB Buffers: 1156 kB Cached: 653504 kB SwapCached: 0 kB Active: 630376 kB Inactive: 548004 kB Active(anon): 525240 kB Inactive(anon): 25136 kB Active(file): 105136 kB Inactive(file): 522868 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 8257532 kB SwapFree: 8257532 kB Dirty: 3712 kB Writeback: 0 kB AnonPages: 524036 kB Mapped: 160076 kB Shmem: 26340 kB Slab: 110152 kB SReclaimable: 41328 kB SUnreclaim: 68824 kB KernelStack: 10464 kB PageTables: 36248 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 13284752 kB Committed_AS: 4057108 kB VmallocTotal: 34359738367 kB VmallocUsed: 243188 kB VmallocChunk: 34359277564 kB Percpu: 56320 kB HardwareCorrupted: 0 kB AnonHugePages: 90112 kB CmaTotal: 0 kB CmaFree: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 171840 kB DirectMap2M: 5070848 kB DirectMap1G: 7340032 kB [root@192 ~]# |
- 查看硬盘信息
1 2 3 4 5 6 7 | [root@192 ~]# fdisk -l | grep 磁盘 磁盘 /dev/sda:161.1 GB, 161061273600 字节,314572800 个扇区 磁盘标签类型:dos 磁盘标识符:0x000a449d 磁盘 /dev/mapper/centos-root:125.4 GB, 125397106688 字节,244916224 个扇区 磁盘 /dev/mapper/centos-swap:8455 MB, 8455716864 字节,16515072 个扇区 磁盘 /dev/mapper/centos-home:25.1 GB, 25052577792 字节,48930816 个扇区 |
软件配置
- 检查操作系统
1 2 | [root@192 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) |
建议:提前检查下端口,避免安装的时候冲突。
常用的默认端口 20001、2379、6666、5432、15432、20010等
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | [root@192 ~]# netstat -ntlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 783/rpcbind tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1574/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1216/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1215/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1553/master tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 2989/sshd: root@pts tcp6 0 0 :::111 :::* LISTEN 783/rpcbind tcp6 0 0 :::22 :::* LISTEN 1216/sshd tcp6 0 0 ::1:631 :::* LISTEN 1215/cupsd tcp6 0 0 ::1:25 :::* LISTEN 1553/master tcp6 0 0 ::1:6010 :::* LISTEN 2989/sshd: root@pts [root@192 ~]# |
集群规划
实操环境:GBase 8c分布式集群,三台虚拟机。
node1 GHA Server、DCS、GTM主,dn2备 | 192.168.254.141 | |
node2 DCS、CN1、GTM备、DN1主 | 192.168.254.142 | |
node3 DCS、CN2、DN2主 | 192.168.254.143 |
安装准备工作
所有节点上进行! 所有节点上进行! 所有节点上进行!
关闭防火墙
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # 首先检查防火墙状态 # 若处于关闭状态,不用操作。 # 若处于开启状态,需要手动关闭防火墙 [root@192 ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since 二 2023-03-21 20:26:05 CST; 10min ago Docs: man:firewalld(1) Main PID: 890 (firewalld) Tasks: 2 CGroup: /system.slice/firewalld.service └─890 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid 3月 21 20:26:04 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 3月 21 20:26:05 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. 3月 21 20:26:05 localhost.localdomain firewalld[890]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Ple...bling it now. Hint: Some lines were ellipsized, use -l to show in full. # 关闭防火墙 [root@192 ~]# systemctl stop firewalld # 禁止开机自启动 [root@192 ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. # 再次检查防火墙状态 [root@192 ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) 3月 21 20:26:04 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon... 3月 21 20:26:05 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon. 3月 21 20:26:05 localhost.localdomain firewalld[890]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Ple...bling it now. 3月 21 20:37:02 192.168.254.141 systemd[1]: Stopping firewalld - dynamic firewall daemon... 3月 21 20:37:03 192.168.254.141 systemd[1]: Stopped firewalld - dynamic firewall daemon. Hint: Some lines were ellipsized, use -l to show in full. |
关闭SELINUX
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # 检查服务状态 [root@192 ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 31 [root@192 ~]# # 若处于关闭状态,不用操作。 # 若处于开启状态enabled,需要关闭服务器。 # 修改配置文件:vim /etc/selinux/config [root@192 ~]# vim /etc/selinux/config # 将 SELINUX 参数设置为 disabled SELINUX=disabled # :wq保存 reboot |
1 2 3 4 5 6 7 8 9 10 11 | # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted |
环境检查
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 设置主机名 [root@192 ~]# hostnamectl set-hostname gbase8c_5_141 [root@192 ~]# hostnamectl set-hostname gbase8c_5_142 [root@192 ~]# hostnamectl set-hostname gbase8c_5_143 # 或者 vim /etc/hostname [root@192 ~]# hostname gbase8c_5_141 [root@192 ~]# hostname gbase8c_5_142 [root@192 ~]# hostname gbase8c_5_143 |
1 2 3 4 5 6 7 8 9 10 11 12 | # 检查依赖 # 若显示的依赖版本信息在软件依赖配置要求中,无需操作。 # libaio-devel、lsb_release、ncurses-devel已集成在安装包中,无需检查。 [root@192 ~]# rpm -q bison flex patch bzip2 bison-3.0.4-2.el7.x86_64 flex-2.5.37-6.el7.x86_64 patch-2.7.1-12.el7_7.x86_64 bzip2-1.0.6-13.el7.x86_64 [root@192 ~]# # 若未安装,执行yum install -y name命令 |
1 2 3 4 5 6 7 8 | # 检查是否支持rdtscp指令集 [root@192 ~]# cat /proc/cpuinfo | grep rdtscp flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities [root@192 ~]# |
配置gbase用户权限
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 在所有节点创建gbase用户组和用户。牢记密码!! # 密码:gbase!@# [root@192 ~]# groupadd gbase [root@192 ~]# [root@192 ~]# useradd -m -d /home/gbase gbase -g gbase [root@192 ~]# # 配置gbase用户的密码 [root@192 ~]# passwd gbase 更改用户 gbase 的密码 。 新的 密码: 无效的密码: 密码包含用户名在某些地方 重新输入新的 密码: passwd:所有的身份验证令牌已经成功更新。 [root@192 ~]# |
1 2 3 4 5 6 | # 编辑sudo配置文件 # /etc/sudoers [root@192 ~]# visudo # 添加如下内容,将 gbase 用户添加至 sudoer 列表。 gbase ALL=(ALL) NOPASSWD:ALL |
1 2 3 | # 配置完成后,切换为gbase用户。后续操作均以gbase身份进行。 [root@192 ~]# su gbase [gbase@gbase8c_5_141 root]$ |
配置NTP同步
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # 检查ntp服务正常运行 [gbase@gbase8c_5_141 root]$ sudo systemctl status ntpd.service ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled) Active: inactive (dead) # 启动ntp服务 [gbase@gbase8c_5_141 root]$ sudo systemctl start ntpd.service # 设置开机启动 [gbase@gbase8c_5_141 root]$ sudo systemctl enable ntpd.service Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service. # 再次检查ntp服务正常运行 [gbase@gbase8c_5_141 root]$ sudo systemctl status ntpd.service ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled) Active: active (running) since 二 2023-03-21 21:12:22 CST; 14s ago Main PID: 3374 (ntpd) CGroup: /system.slice/ntpd.service └─3374 /usr/sbin/ntpd -u ntp:ntp -g 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listen normally on 2 lo 127.0.0.1 UDP 123 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listen normally on 3 ens33 192.168.254.141 UDP 123 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listen normally on 4 virbr0 192.168.122.1 UDP 123 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listen normally on 5 lo ::1 UDP 123 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listen normally on 6 ens33 fe80::6eb3:53:eac0:83cd ...123 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: Listening on routing socket on fd #23 for interface...tes 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: 0.0.0.0 c016 06 restart 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM 3月 21 21:12:22 gbase8c_5_141 ntpd[3374]: 0.0.0.0 c011 01 freq_not_set 3月 21 21:12:29 gbase8c_5_141 ntpd[3374]: 0.0.0.0 c614 04 freq_mode Hint: Some lines were ellipsized, use -l to show in full. [gbase@gbase8c_5_141 root]$ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # 人为选取node1(GTM主)为NTP主节点(对节点类型没要求) # 编辑NTP主节点配置文件 [gbase@gbase8c_5_141 root]$ sudo vi /etc/ntp.conf # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default nomodify notrap nopeer noquery # 添加内容,本机IP restrict 192.168.254.141 nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. # 添加内容,子网掩码 restrict 192.168.254.255 mask 255.255.255.0 nomodify notrap restrict 127.0.0.1 restrict ::1 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap # 添加内容,127.127.1.0(本地时钟) server 127.127.1.0 Fudge 127.127.1.0 stratum 10 # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). # 注释内容 #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst #broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | # 编辑NTP备节点配置文件 [gbase@gbase8c_5_142 root]$ sudo vi /etc/ntp.conf [gbase@gbase8c_5_143 root]$ sudo vi /etc/ntp.conf # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default nomodify notrap nopeer noquery # 添加内容 restrict 192.168.254.142 nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. # 添加内容 restrict 192.168.254.255 mask 255.255.255.0 nomodify notrap restrict 127.0.0.1 restrict ::1 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap # 添加内容,此处为NTP主节点的IP地址 server 192.168.254.141 Fudge 192.168.254.141 stratum 10 # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). # 注释内容 #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default nomodify notrap nopeer noquery # 添加内容 restrict 192.168.254.143 nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. # 添加内容 restrict 192.168.254.255 mask 255.255.255.0 nomodify notrap restrict 127.0.0.1 restrict ::1 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap # 添加内容,此处为NTP主节点的IP地址 server 192.168.254.141 Fudge 192.168.254.141 stratum 10 # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.centos.pool.ntp.org iburst #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst |
配置gbase免密互信
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | # 在所有节点创建 gbase 用户的.ssh 目录,并授权 [gbase@gbase8c_5_141 root]$ mkdir ~/.ssh [gbase@gbase8c_5_141 root]$ chmod 700 ~/.ssh # 生成密钥文件 [gbase@gbase8c_5_141 root]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/gbase/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/gbase/.ssh/id_rsa. Your public key has been saved in /home/gbase/.ssh/id_rsa.pub. The key fingerprint is: SHA256:xcduS8xSamyAfm+zWH+qk6mVffJB6V+hfv2971xdJqw gbase@gbase8c_5_141 The key's randomart image is: +---[RSA 2048]----+ | | | . . . | | . . o + | | . + B . . | | . S * * =.o| | . + * =.o+| | BoE.+ =| | =++.+.==| | o.ooo+oo@| +----[SHA256]-----+ # 将密钥上传至所有节点,包括本节点,此操作需输入密码,为gbase用户的密码 [gbase@gbase8c_5_141 root]$ ssh-copy-id gbase@192.168.254.141 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/gbase/.ssh/id_rsa.pub" The authenticity of host '192.168.254.141 (192.168.254.141)' can't be established. ECDSA key fingerprint is SHA256:XyUe4k3DBDE4uUCYlAbDGds+qdF6FIunxj8rwS5DEBc. ECDSA key fingerprint is MD5:4c:7d:50:05:df:4b:32:6c:2d:f0:00:2d:dc:ab:7b:df. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys gbase@192.168.254.141's password: Permission denied, please try again. gbase@192.168.254.141's password: Permission denied, please try again. gbase@192.168.254.141's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'gbase@192.168.254.141'" and check to make sure that only the key(s) you wanted were added. [gbase@gbase8c_5_141 root]$ ssh-copy-id gbase@192.168.254.142 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/gbase/.ssh/id_rsa.pub" The authenticity of host '192.168.254.142 (192.168.254.142)' can't be established. ECDSA key fingerprint is SHA256:cHEe6Qbl1yGNVhIO5nefAslHB1Z9s7XrlfpWASGXq2s. ECDSA key fingerprint is MD5:0b:d6:d3:77:5c:33:40:d5:8e:8b:90:30:fe:31:95:ba. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys gbase@192.168.254.142's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'gbase@192.168.254.142'" and check to make sure that only the key(s) you wanted were added. [gbase@gbase8c_5_141 root]$ ssh-copy-id gbase@192.168.254.143 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/gbase/.ssh/id_rsa.pub" The authenticity of host '192.168.254.143 (192.168.254.143)' can't be established. ECDSA key fingerprint is SHA256:hRXSZ/S3jUNMDdqNETwX9iucmVUhZJI36cdBbflblTs. ECDSA key fingerprint is MD5:2f:08:ff:c8:c1:ed:13:45:f4:99:9d:4d:9c:2d:a2:64. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys gbase@192.168.254.143's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'gbase@192.168.254.143'" and check to make sure that only the key(s) you wanted were added. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 检验是否完成互信免密(不需要输入密码,就是配置成功) # 192.168.254.141--->192.168.254.142 [gbase@gbase8c_5_141 root]$ ssh gbase@192.168.254.142 Last login: Tue Mar 21 21:09:16 2023 [gbase@gbase8c_5_142 ~]$ # 192.168.254.142--->192.168.254.143 [gbase@gbase8c_5_142 root]$ ssh gbase@192.168.254.143 Last login: Tue Mar 21 21:09:16 2023 [gbase@gbase8c_5_143 ~]$ # 192.168.254.143--->192.168.254.141 [gbase@gbase8c_5_143 root]$ ssh gbase@192.168.254.142 Last login: Tue Mar 21 22:07:37 2023 from 192.168.254.143 [gbase@gbase8c_5_142 ~]$ |
安装工作(部署机上进行)
分布式情况下一般选GTM主节点作为部署机
1 2 3 4 5 6 7 8 9 10 11 12 | # 上传安装包,修改权限,属于gbase用户 [gbase@gbase8c_5_141 ~]$ pwd /home/gbase [gbase@gbase8c_5_141 ~]$ cd gbase_package/ [gbase@gbase8c_5_141 gbase_package]$ ll 总用量 262300 -rw-r--r-- 1 root root 268594324 3月 21 22:18 GBase8cV5_S3.0.0B76_centos7.8_x86_64.tar.gz [gbase@gbase8c_5_141 gbase_package]$ sudo chown -R gbase:gbase GBase8cV5_S3.0.0B76_centos7.8_x86_64.tar.gz [gbase@gbase8c_5_141 gbase_package]$ ll 总用量 262300 -rw-r--r-- 1 gbase gbase 268594324 3月 21 22:18 GBase8cV5_S3.0.0B76_centos7.8_x86_64.tar.gz [gbase@gbase8c_5_141 gbase_package]$ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # 两级解压 [gbase@gbase8c_5_141 gbase_package]$ tar -xvf GBase8cV5_S3.0.0B76_centos7.8_x86_64.tar.gz GBase8cV5_S3.0.0B76_CentOS_x86_64_om.sha256 GBase8cV5_S3.0.0B76_CentOS_x86_64_om.tar.gz GBase8cV5_S3.0.0B76_CentOS_x86_64_pgpool.tar.gz GBase8cV5_S3.0.0B76_CentOS_x86_64.sha256 GBase8cV5_S3.0.0B76_CentOS_x86_64.tar.bz2 [gbase@gbase8c_5_141 gbase_package]$ tar -xvf GBase8cV5_S3.0.0B76_CentOS_x86_64_om.tar.gz ./dependency/ ./dependency/etcd-3.2.28-1.el7_8.x86_64.rpm ./dependency/etcd-server_3.2.17+dfsg-1_amd64.deb ./dependency/pipexec_2.5.5-1_amd64.deb ./dependency/lib64/ ./dependency/lib64/libcrypto.so.1.1.1e ./dependency/lib64/libcrypto.so.1.1 ./dependency/lib64/libssl.so.1.1.1e ./dependency/lib64/libssl.so.1.1 ./dependency/lib64/libcrypto.so.10 ./dependency/lib64/libcrypto.so.1.0.2k ./dependency/lib64/libffi.so.6 ./dependency/lib64/libffi.so.6.0.1 ./dependency/lib64/libncurses.so.5 ./dependency/lib64/libncurses.so.5.9 ./dependency/lib64/libreadline.so.6 ./dependency/lib64/libreadline.so.6.2 ./dependency/lib64/libssl.so.10 ./dependency/lib64/libssl.so.1.0.2k ./dependency/lib64/libtinfo.so.5 ./dependency/lib64/libtinfo.so.5.9 …… |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 查看目录 [gbase@gbase8c_5_141 gbase_package]$ ll 总用量 526104 drwxrwxr-x 5 gbase gbase 165 2月 27 16:48 dependency -rw-r--r-- 1 gbase gbase 268594324 3月 21 22:18 GBase8cV5_S3.0.0B76_centos7.8_x86_64.tar.gz -rw-rw-r-- 1 gbase gbase 65 2月 27 16:48 GBase8cV5_S3.0.0B76_CentOS_x86_64_om.sha256 -rw-rw-r-- 1 gbase gbase 103802128 2月 27 16:48 GBase8cV5_S3.0.0B76_CentOS_x86_64_om.tar.gz -rw-rw-r-- 1 gbase gbase 1035780 2月 27 16:48 GBase8cV5_S3.0.0B76_CentOS_x86_64_pgpool.tar.gz -rw-rw-r-- 1 gbase gbase 65 2月 27 16:48 GBase8cV5_S3.0.0B76_CentOS_x86_64.sha256 -rw-rw-r-- 1 gbase gbase 165255046 2月 27 16:48 GBase8cV5_S3.0.0B76_CentOS_x86_64.tar.bz2 -rw-rw-r-- 1 gbase gbase 2570 2月 27 16:48 gbase.yml drwxrwxr-x 11 gbase gbase 4096 2月 27 16:48 gha -rw-rw-r-- 1 gbase gbase 188 2月 27 16:48 gha_ctl.ini drwxrwxr-x 2 gbase gbase 96 2月 27 16:48 lib -rw-rw-r-- 1 gbase gbase 729 2月 27 16:48 package_info.json drwxr-xr-x 4 gbase gbase 28 3月 16 2021 python3.8 drwxrwxr-x 10 gbase gbase 4096 2月 27 16:48 script drwxrwxr-x 2 gbase gbase 330 2月 27 16:48 simpleInstall -rw-rw-r-- 1 gbase gbase 118 2月 27 16:48 ubuntu_version.json drwx------ 6 gbase gbase 87 7月 2 2022 venv -rw-rw-r-- 1 gbase gbase 36 2月 27 16:48 version.cfg [gbase@gbase8c_5_141 gbase_package]$ |