失效链接处理 |
K8S在线安装部署手册 PDF 下载
本站整理下载:
相关截图:
![]()
主要内容:
1.1系统初始化
1.1.1设置永久主机名称
hostnamectl set-hostname m01
hostnamectl set-hostname s01
hostnamectl set-hostname s02
1.1.2添加主机名和IP的对应关系
cat >> /etc/hosts <<EOF
10.0.0.3 m01 m01
10.0.0.5 s01 s01
10.0.0.4 s02 s02
EOF
1.1.3m01节点免密码ssh登录其他节点
ssh-keygen -t rsa
ssh-copy-id root@m01
ssh-copy-id root@s01
ssh-copy-id root@s02
注意:遇到即使root用户也无法修改.ssh里相关文件的解决方法
使用chattr和lsattr指令修改文件属性,然后就可以调整文件权限了
1.1.4关闭每台机器上的防火墙
systemctl stop firewalld
systemctl disable firewalld
iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat
iptables -P FORWARD ACCEPT
1.1.5关闭swap分区
swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
1.1.6设置时区
# 调整系统 TimeZone
timedatectl set-timezone Asia/Shanghai
# 将当前的 UTC 时间写入硬件时钟
timedatectl set-local-rtc 0
# 重启依赖于系统时间的服务
systemctl restart rsyslog
systemctl restart crond
[root@m01 ~]# timedatectl set-timezone Asia/Shanghai
[root@m01 ~]# timedatectl set-local-rtc 0
[root@m01 ~]#
1.1.7更新系统时间
ntpdate cn.pool.ntp.org
[root@m01 ~]# ntpdate cn.pool.ntp.org
19 Apr 14:31:13 ntpdate[16848]: the NTP socket is in use, exiting
[root@m01 ~]#
1.2install docker
1.2.1卸载旧版docker并手动删除/var/lib/docker目录
[root@m01 ~]# sudo yum remove docker \
> docker-client \
> docker-client-latest \
> docker-common \
> docker-latest \
> docker-latest-logrotate \
> docker-logrotate \
> docker-selinux \
> docker-engine-selinux \
> docker-engine
|