标签:用户 firewall manage ali close download host bak ase
0.系统准备==注:==第一篇需要在所有机器上执行
hostname | 角色 |
---|---|
host1 | master1 |
host2 | master2 |
host3 | master3 |
host4 | node1 |
host5 | node2 |
host6 | node3 |
host7 | 私有仓库nexus |
全程课程使用的材料到我的网盘下载,提取码:uloz
方案一:使用我的材料
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
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
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
配置docker源
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
}
启动docker
systemctl start docker
systemctl enable docker.service
systemctl status docker
标签:用户 firewall manage ali close download host bak ase
原文地址:https://blog.51cto.com/evawalle/2494927