How to install Rancher on Centos 8
Subscribe for more computer tips:
https://www.youtube.com/c/HeikkiKoivisto/?sub_confirmation=1
How to install Rancher on Centos 8. Rancher is simply way to deploy docker containers. Here is commands:
How to install Rancher to CentOS 8
add docker repo to centos
sudo dnf config-manager –add-repo=https://download.docker.com/linux/centos/docker-ce.repo
check what version are available from docker-ce
sudo dnf list docker-ce –showduplicates | sort -r
Install docker-ce
sudo dnf install docker-ce –nobest
Following sysctl settings must be applied /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables=1
Enable docker on startup
sudo systemctl enable –now docker
add user to docker group – required reboot / logout
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot
Install Rancher with Self-signed Cerificate
docker run -d –restart=unless-stopped
-p 443:443 -p 80:80
–privileged
rancher/rancher:latest
open ports from firewall or disable firewall (systemctl disable firewalld)
systemctl start firewalld
systemctl enable firewalld
firewall-cmd –permanent –add-port=22/tcp
firewall-cmd –permanent –add-port=80/tcp
firewall-cmd –permanent –add-port=443/tcp
firewall-cmd –permanent –add-port=2376/tcp
firewall-cmd –permanent –add-port=2379/tcp
firewall-cmd –permanent –add-port=2380/tcp
firewall-cmd –permanent –add-port=6443/tcp
firewall-cmd –permanent –add-port=8472/udp
firewall-cmd –permanent –add-port=9099/tcp
firewall-cmd –permanent –add-port=10250/tcp
firewall-cmd –permanent –add-port=10254/tcp
firewall-cmd –permanent –add-port=30000-32767/tcp
firewall-cmd –permanent –add-port=30000-32767/udp
firewall-cmd –permanent –add-port=8080/tcp
firewall-cmd –change-interface=docker0
firewall-cmd –add-masquerade –permanent
firewall-cmd –reload
systemctl restart docker
Support on Patreon!:
https://www.patreon.com/heikkikoivisto
centos 8