更新时间:2024-12-10 GMT+08:00
命令行参考
功能
主备集群配置互信并校验互信,方便主备集群容灾过程中免密执行命令、传送文件。
命令格式
python3 $GPHOME/script/ESLDoTrust.py -f <trustFile> [-l <logFile>]
参数说明
完整选项 |
缩写选项 |
数据类型 |
说明 |
取值类型 |
缺省值 |
应用实例 |
---|---|---|---|---|---|---|
-f |
不涉及 |
字符串 |
主机列表,列出所有需要建立互信主机的IP。 |
不涉及 |
不涉及 |
-f /home/userA/cluster_ssh |
-l |
不涉及 |
字符串 |
指定日志文件的保存路径。 |
不涉及 |
不涉及 |
-l /home/userA/trust.log |
使用指南
- ESLDoTrust.py需要在主集群的主节点上登录账号执行,需要用户账号密码和root密码。命令包含配置互信、校验互信等操作。
- 互信文件格式如下:
192.168.240.1 192.168.240.2 192.168.240.3 192.168.240.4 192.168.240.5 192.168.240.6
命令示例
python3 $GPHOME/script/ESLDoTrust.py -f /home/omm/cluster_ssh
系统回显
建立集群用户互信:
[perfadm@ecs-env-2988 ~]$ python3 $GPHOME/script/ESLDoTrust.py -f /home/perfadm/cluster_ssh Please enter password for current user[perfadm]. Password: Checking network information. All nodes in the network are Normal. Successfully checked network information. Write all hostname and Ip into /etc/hosts. Please enter password for current user[root] on the node[192.168.0.205]. Password: Creating SSH trust. Getting the local key file. Successfully get the local key files. Appending local ID to authorized_keys. Successfully appended local ID to authorized_keys. Updating the known_hosts file. Successfully updated the known_hosts file. Appending authorized_key on the remote node. Successfully appended authorized_key on all remote node. Updating authorized_keys. Getting the remote key file. Successfully get the remote key files. Successfully updated authorized_keys. Checking common authentication file content. Successfully checked common authentication content. Distributing SSH trust file to all node. Successfully distributed SSH trust file to all node. Verifying SSH trust on all hosts. Successfully verified SSH trust on all hosts. Successfully created SSH trust.
父主题: ESLDoTrust.py