企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
>[info] 秘钥互信(节点配置好ssh ) **每个节点都执行:** 1. 安装基础依赖包(每台机器都需要安装) ``` yum install -y perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker perl-CPAN perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-ParallelForkManager perl-Time-HiRes ``` 2. 执行配置命令 ``` cd ~ # 看到提示不用管,一路回车 y 就是 ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys ``` **只要在一个节点执行即可:(主节点:192.168.83.130)** 1. 配置 ``` ssh 192.168.83.131 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys ssh 192.168.83.132 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys # 分发整合后的文件到其它节点 scp ~/.ssh/authorized_keys 192.168.83.131:~/.ssh/ scp ~/.ssh/authorized_keys 192.168.83.132:~/.ssh/ ``` 2. 在从节点连接主节点测试(是否需要输入密码,不需要则成功) ``` ip addr | grep 13 ssh root@192.168.83.130 ``` ![](https://img.kancloud.cn/aa/59/aa592a03086fc9363725f680a72d62eb_556x82.png) **注:** 如果测试不行,直接到 从节点 把 密钥 追加过来 ``` ssh 192.168.83.130 cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys ```