ubuntu 20.04
openssh安装
下载:
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends openssh-server | grep -v i386 | grep "^\w")
安装:
sudo dpkg -i *.deb
开启远程登录
-
sudo su
-
修改root密码
passwd root # 输入两次密码:123456
ssh允许root登录
vim /etc/ssh/sshd_config #PermitRootLogin prohibit-password 修改成: PermitRootLogin yes
关闭swap
vim /etc/fstab
# 注释swapfile
#/swapfile none swap sw 0 0
修改host
各节点hostname不能重复,master1,master2,master3,node1,node2,node3 …
vim /etc/hostname
重启服务器
init 6