kubernetes学习系列安装篇--第一篇:环境准备
2021-03-07 15:29
标签:用户 firewall manage ali close download host bak ase ==注:==第一篇需要在所有机器上执行 全程课程使用的材料到我的网盘下载,提取码:uloz 方案一:使用我的材料 方案二: 手动配置环境 配置docker源 启动docker kubernetes学习系列安装篇--第一篇:环境准备 标签:用户 firewall manage ali close download host bak ase 原文地址:https://blog.51cto.com/evawalle/2494927
hostname
角色
host1
master1
host2
master2
host3
master3
host4
node1
host5
node2
host6
node3
host7
私有仓库nexus
1.环境配置
tar -zxf nexus3.tar.gz
cd nexus3
bash init_environment.sh
### env
# close firewall
systemctl stop firewalld
systemctl disable firewalld
iptables -F
# close swaoff
swapoff -a
sed -i ‘/ swap / s/^\(.*\)$/#\1/g‘ /etc/fstab
# disable selinux
setenforce 0
sed -i ‘s/^SELINUX=enforcing/SELINUX=disabled/g‘ /etc/selinux/config
# allow create br
echo """
vm.swappiness = 0
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
""" >> /etc/sysctl.conf
2.更换yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce -y
mkdir -p /etc/docker
vim /etc/docker/daemon.json
{
"registry-mirrors" : [
"http://md4nbj2f.mirror.aliyuncs.com",
"http://registry.docker-cn.com",
"http://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com"
],
"insecure-registries" : [
"registry.docker-cn.com",
"docker.mirrors.ustc.edu.cn"
],
"debug" : true,
"experimental" : true
}
systemctl start docker
systemctl enable docker.service
systemctl status docker