How to install Rancher on CentOS 7
Install Rancher on CentOS 7
Rancher is an open source software that helps you to run the containers in production. With rancher, you no need to build containers from scratch it supplies entire software stack needed to manage container. Rancher is based on Docker containers, which is why it can be run on a dedicated box, KVM machine or even on a LXC container. Moreover, it provides a huge library of applications which are installed within a few clicks and it also supports Docker images from Dockerhub. It is so simple to install Rancher on CentOS 7.
Prerequisites
Linux host must have a kernel version 3.10 and above should have at least 1GB memory.
Installing Rancher
First, make sure that execute the following command to launch the Rancher Server.
[root@linuxhelp ~]# docker run -d --restart=always -p 8080:8080 rancher/server
Unable to find image ' rancher/server:latest' locally
latest: Pulling from rancher/server
bae382666908: Pull complete
29ede3c02ff2: Pull complete
da4e69f33106: Pull complete
8d43e5f5d27f: Pull complete
b0de1abb17d6: Pull complete
422f47db4517: Pull complete
79d37de643ce: Pull complete
69d13e08a4fe: Pull complete
2ddfd3c6a2b7: Pull complete
bc433fed3823: Pull complete
b82e188df556: Pull complete
dae2802428a4: Pull complete
a6247572ea3c: Pull complete
884c916ebae4: Pull complete
85517c9c5365: Pull complete
02dded9fe690: Pull complete
fd9f433c3bc6: Pull complete
44d91b3fea45: Pull complete
0d463387dfeb: Pull complete
60753c4d26f0: Pull complete
a003892966fe: Pull complete
Digest: sha256:42441f0128fae4d72d51f92de2049392427d462356282a46f28434332967c7e4
Status: Downloaded newer image for rancher/server:latest
41e93100d7f61f30efeedd9bb433f97a02d4e364166ed357f31c62b3a2349b9d
And then, you need to verify that Rancher Server container is running without any issue.
[root@linuxhelp ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
41e93100d7f6 rancher/server " /usr/bin/entry /usr&hellip " 24 hours ago Up 23 seconds 3306/tcp, 0.0.0.0:8080-> 8080/tcp elated_lamport
Once it is done, you need to try and access the following URL.

Add host
Now let' s try adding the Host. Since we are doing a single host Rancher installation, we will add the same host running the Rancher server as a host of Rancher UI. Choose Add Hosts from Infrastructure.

For first time users, Rancher will prompt to select an IP address and it must be reachable to all hosts that you will be adding.

Just click Save.
In the next page. the list of cloud providers will be available. Since we will be adding the host that is running Rancher server, we will select the “ custom” option. Once you selected the custom option, Rancher will provide a command to use to add hosts.
Enter the public IP address of the host in the text box provided in the 4th step, now copy the whole command provided in the 5th step and run it on the Rancher host.

And then, click close on the Rancher UI. Wait for a while the host will be soon visible in Infrastructure &ndash > Hosts page.

Getting Started with First Container:
Now, n Host Page, click on Add + Add container Rancher will take you to Add container page where we will create our first container. You should name your container and add other details.


You will now see that creation of Ubuntu container is in progress. It will only take less than a minute.


You will experience that Rancher not only manages containers that are created by own it can also manage that are created with native Docker commands.
Comments ( 0 )
No comments available