How To Install Rancher on CentOS 7

Rancher on CentOS 7

The rancher is an open source program which helps you to run the containers in production. The rancher is based on Docker, which means it’s possible to run it on a dedicated box, KVM machine or perhaps on a LXC container. Rancher provides a huge library of applications which are installed in a few clicks and also supports docker pictures from Dockerhub.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Docker.

Step 3. Installing Rancher.

Step 4. Configure Firewall for Rancher.

Step 5. Accessing Rancher.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Rancher private container service on a CentOS 7 server.
Install Rancher on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Docker.

Before we install the Rancher server, we have to install the docker machine. If you do not have docker installed, you can follow our guide here.

Step 3. Installing Rancher.

On the Linux machine with Docker installed, the command to start a single instance of Rancher is simple:

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

Step 4. Configure Firewall for Rancher.

Rancher server uses port 8080 for the web interface. Configure the firewall to allow port 8080 and reload it:

firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

Step 5. Accessing Rancher.

Rancher will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required the steps to finish the installation.

*Rancher doesn’t configure access control by default, so it is important to set this up immediately, otherwise the UI and API can be accessed by anyone who has your IP.

Congratulation’s! You have successfully installed Rancher. Thanks for using this tutorial for installing Rancher private container service on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Rancher web site.

How To Install Rancher on Ubuntu 16.04 LTS

Install Rancher on Ubuntu 16

The rancher is an open source program which helps you to run the containers in production. The rancher is based on Docker, which means it’s possible to run it on a dedicated box, KVM machine or perhaps on a LXC container. Rancher provides a huge library of applications which are installed in a few clicks and also supports docker pictures from Dockerhub.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Rancher private container on a Ubuntu 16.04 (Xenial Xerus) server.

Install Rancher on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Docker.

Before we install the Rancher server, we have to install the docker machine. If you do not have docker installed, you can follow our guide here.

Step 3. Installing Rancher.

On the Linux machine with Docker installed, the command to start a single instance of Rancher is simple:

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

Step 4. Accessing Rancher.

Rancher will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required the steps to finish the installation.

*Rancher doesn’t configure access control by default, so it is important to set this up immediately, otherwise the UI and API can be accessed by anyone who has your IP.

Congratulation’s! You have successfully installed Rancher. Thanks for using this tutorial for installing latest stable version of Rancher private container on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Rancher web site.