1.防火墙设置
firewall-cmd --add-port 80/tcp --permanent
firewall-cmd --add-port 443/tcp --permanent
firewall-cmd --reload
- 安装Docker
yum install docker -y
service docker start
- 安装Rancker
docker pull rancher/rancher:stable
hostnamectl set-hostname rancher
mkdir -p /home/rancher/rancher
mkdir -p /home/rancher/auditlog
docker run -d --privileged --restart=unless-stopped -p 80:80 -p 443:443 -v /home/rancher/rancher:/var/lib/rancher -v /home/rancher/auditlog:/var/log/auditlog --name rancher rancher/rancher:stable