Rancher is an open source platform for running containers and building a private container service.

Rancher is based on Docker, so you can run it on a dedicated box, KVM machine or even on a LXC container.

Rancher provides a huge library of applications which are installed within a few clicks and also supports docker images from Dockerhub.

In this blog, we will see how to install Rancher in Centos 8.

Prerequisites :

Packages : Docker
OS  : Centos 8
Total servers : 2

Step 1 :

Server A : 192.168.56.136 (Server)
Server B : 192.168.56.137 (Agent)

Docker Installation in centos 8,

Add docker repos and install docker in both servers,

# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# dnf install --nobest docker-ce -y


Start docker service,

systemctl daemon-reload
# systemctl start docker
# systemctl enable docker

Step 2:

Rancher installation,

Go to Server A,

docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable

Check the docker container status,

# docker ps -a



Step 3 :

Verify Rancher Installation,

Go to browser and check Rancher Web console,

URL ; Rancher Server ip or url:8080

Eg : http://192.168.56.136:8080



Step 4 :

Enable authentication for Rancher,

Go to Admin > Access Control > Choose "Local" and Enter the required details.



Now log out and log in with the new credentials.

Step 5 :

Add a new host(server) to Rancher,

In Rancher Console, choose Infrastructure > Hosts > choose Add Host.



Now copy the command from line 5 and execute in server B, then wait for few minutes. The server B will be listed in Rancher console.

Rancher Server and Agent has been installed successfully in Centos 8.



Post a Comment

Previous Post Next Post