标签:服务器 etc 监控 .sh cat rmi exe x86 服务
Greenplum : >>>>链接地址
Pgadmin客户端 : >>>链接地址
greenplum-cc-web监控: >>>>链接地址
服务器ip | 主机名 | 角色 | 系统版本 |
192.168.0.221 | greenplum01 | master | centos7 |
192.168.0.222 | greenplum02 | Segment/standby | centos7 |
192.168.0.223 | greenplum03 | Segment | centos7 |
echo -e "192.168.0.221 greenplum01\n192.168.0.222 greenplum02\n192.168.0.223 greenplum03" >>/etc/hosts scp /etc/hosts 192.168.0.222:/etc/hosts scp /etc/hosts 192.168.0.223:/etc/hosts
[root@greenplum01 ~]# groupadd -g 530 gpadmin [root@greenplum01 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum01 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@greenplum02 ~]# groupadd -g 530 gpadmin [root@greenplum02 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum02 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@greenplum03 ~]# groupadd -g 530 gpadmin [root@greenplum03 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum03 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
echo ‘ kernel.shmmax = 500000000 kernel.shmmni = 4096 kernel.shmall = 4000000000 kernel.sem = 250 512000 100 2048 kernel.sysrq = 1 kernel.core_uses_pid = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.msgmni = 2048 net.ipv4.tcp_syncookies = 1 net.ipv4.ip_forward = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.conf.all.arp_filter = 1 net.ipv4.ip_local_port_range = 1025 65535 net.core.netdev_max_backlog = 10000 net.core.rmem_max = 2097152 net.core.wmem_max = 2097152 vm.overcommit_memory = 2 ‘>>/etc/sysctl.conf
sysctl -
echo ‘ * soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072 ‘>>/etc/security/limits.conf
systemctl disable firewalld.service systemctl stop firewalld.service setenforce 0
mkdir /greenplum
chown -R gpadmin:gpadmin /greenplum
[root@greenplum01 ~]# ls anaconda-ks.cfg greenplum-cc-web-4.6.1-LINUX-x86_64 initial-setup-ks.cfg Templates Desktop greenplum-cc-web-4.6.1-LINUX-x86_64.zip Music Videos Documents greenplum-db-5.16.0-rhel7-x86_64.rpm Pictures Downloads Public [root@greenplum01 ~]# rpm -ivh greenplum-db-5.16.0-rhel7-x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:greenplum-db-5.16.0-1 ################################# [100%]
chown -R gpadmin:gpadmin /usr/local/ su - gpadmin mkdir -p /home/gpadmin/conf vi /home/gpadmin/conf/hostlist greenplum01 greenplum02 greenplum03
再创建一个seg_hosts ,包含所有的Segment Host的主机名:
vi /home/gpadmin/conf/seg_hosts
greenplum02
greenplum03
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh-exkeys -f /home/gpadmin/conf/hostlist [STEP 1 of 5] create local ID and authorize on local host [STEP 2 of 5] keyscan all hosts and update known_hosts file [STEP 3 of 5] authorize current user on remote hosts ... send to greenplum02 *** *** Enter password for greenplum02: ... send to greenplum03 [STEP 4 of 5] determine common authentication file content [STEP 5 of 5] copy authentication files to all remote hosts ... finished key exchange with greenplum02 ... finished key exchange with greenplum03 [INFO] completed successfully
验证链接:
[gpadmin@greenplum01 ~]$ ssh greenplum02 [gpadmin@greenplum02 ~]$ exit logout Connection to greenplum02 clsed. [gpadmin@greenplum01 ~]$ ssh greenplum03 [gpadmin@greenplum02 ~]$ exit logout Connection to greenplum03 clsed.
chown -R gpadmin:gpadmin /usr/local chown -R gpadmin:gpadmin /greenplum
cd /usr/local
tar zcvf gp.tar greenplum-db-5.16.0/ gpscp -f /home/gpadmin/conf/seg_hosts gp.tar =:/usr/local/
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh -f /home/gpadmin/conf/seg_hosts => cd /usr/local [greenplum03] [greenplum02] => tar -xf gp.tar [greenplum03] [greenplum02] => ln -s ./greenplum-db-5.16.0/ greenplum-db [greenplum03] [greenplum02] => ll [greenplum03] total 271720 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 bin [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 etc [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 games [greenplum03] -rw-rw-r-- 1 gpadmin gpadmin 278239886 Mar 12 23:18 gp.tar [greenplum03] lrwxrwxrwx 1 gpadmin gpadmin 22 Mar 12 23:21 greenplum-db -> ./greenplum-db-5.16.0/ [greenplum03] drwxr-xr-x 11 gpadmin gpadmin 138 Mar 12 23:03 greenplum-db-5.16.0 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 include [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib64 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 libexec [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 sbin [greenplum03] drwxr-xr-x. 5 gpadmin gpadmin 49 Feb 18 22:35 share [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 src [greenplum03] drwxrwxr-x 3 gpadmin gpadmin 19 Mar 12 23:21 usr [greenplum02] total 271720 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 bin [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 etc [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 games [greenplum02] -rw-rw-r-- 1 gpadmin gpadmin 278239886 Mar 12 23:18 gp.tar [greenplum02] lrwxrwxrwx 1 gpadmin gpadmin 22 Mar 12 23:21 greenplum-db -> ./greenplum-db-5.16.0/ [greenplum02] drwxr-xr-x 11 gpadmin gpadmin 138 Mar 12 23:03 greenplum-db-5.16.0 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 include [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib64 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 libexec [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 sbin [greenplum02] drwxr-xr-x. 5 gpadmin gpadmin 49 Feb 18 22:35 share [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 src [greenplum02] drwxrwxr-x 3 gpadmin gpadmin 19 Mar 12 23:21 usr
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh -f /home/gpadmin/conf/hostlist => mkdir -p /greenplum/data/master [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data/primary [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data/mirror [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data2/primary [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data2/mirror [greenplum01] [greenplum02] [greenplum03] =>
[gpadmin@greenplum01 ~]$ vim .bash_profile source /usr/local/greenplum-db/greenplum_path.sh export MASTER_DATA_DIRECTORY=/greenplum/data/master/gpseg-1 export GPPORT=5432 export PGDATABASE=gp_db [gpadmin@greenplum01 ~]$ scp .bash_profile greenplum02:/home/gpadmin/ .bash_profile 100% 344 738.4KB/s 00:00 [gpadmin@greenplum01 ~]$ scp .bash_profile greenplum03:/home/gpadmin/ .bash_profile 100% 344 828.8KB/s 00:00 [gpadmin@greenplum01 ~]$ source .bash_profile
[gpadmin@greenplum02 ~]$ source .bash_profile
[gpadmin@greenplum03 ~]$ source .bash_profile
标签:服务器 etc 监控 .sh cat rmi exe x86 服务
原文地址:https://www.cnblogs.com/kingle-study/p/10522076.html