Docker
# 查看server版本
lsb_release -sr
# 更新
sudo apt-get update && sudo apt-get upgrade
# 安装
sudo apt-get install docker-ce
Static IP
# 修改IP
cat << EOF > /etc/netplan/00-installer-config.yaml
network:
version: 2
ethernets:
enp0s5:
dhcp4: no
addresses: [10.211.55.101/24]
gateway4: 10.211.55.1
nameservers:
addresses: [114.114.114.114, 8.8.8.8]
EOF
# 重启网络
sudo netplan apply
SSH
# 修改配置文件
sudo vim /etc/ssh/sshd_config
# 修改 PermitRootLogin yes
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password 修改
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
# 重启ssh
sudo systemctl restart ssh
Root
# 修改root密码
sudo passwd root
hosts
# 设置hostname
hostnamectl set-hostname master-1
# 添加ip解析
cat << EOF >> /etc/hosts
10.211.55.101 master-1
10.211.55.102 master-2
10.211.55.103 master-3
10.211.55.201 etcd-1
10.211.55.202 etcd-2
10.211.55.203 etcd-3
10.211.55.111 worker-1
10.211.55.112 worker-2
10.211.55.113 worker-3
10.211.55.114 worker-4
10.211.55.115 worker-5
10.211.55.116 worker-6
10.211.55.117 worker-7
10.211.55.118 worker-8
10.211.55.119 worker-9
EOF
评论区