摘要:
本文是配置 Linux Cluster 的必要准备步骤,如果不执行这些步骤,配置集训的过程中很可能会出错。
==============================
本文目录
==============================
cluster 实验准备
-------- 1 通过主机名相互识别
-------- 2 通过秘钥相互验证
-------- 3 时间同步
==============================
1 通过主机名相互识别
cat /etc/hosts
192.168.1.61 el61.cos.org el61
192.168.1.62 el62.cos.org el62
2 通过秘钥相互验证
ssh-keygen -t rsa -P ''
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.61
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.60
也可以简单一点
ssh-keygen
ssh-copy-id root@192.168.1.61
ssh-copy-id root@192.168.1.61
额外可选的配置
PermitRootLogin yes
#PasswordAuthentication yes
sed -i \
-e '/#PermitRootLogin yes/ s/#//' \
-e '/^PasswordAuthentication yes/ s/^/#/' \
/etc/ssh/sshd_config
3 时间同步
yum -y install ntp
ntpdate cn.pool.ntp.org