How to install rancher in CentOS 7

Source: Internet
Author: User
Tags centos docker ps docker run

If you want to use rancher, you need to install docker. If the official website cannot be opened, you can also visit the link on this site to refer to the installation
Of course, installing rancher on the official website is also quite detailed. If you can open it, please check it out.

Sysinfo
[Root @ gitlab ~] # Cat/etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[Root @ gitlab ~] # Uname-
Linux gitlab 3.10.0-327.28.2.el7.x86 _ 64 #1 SMP Wed Aug 3 11:11:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[Root @ gitlab ~] # Docker-v
Docker version 1.12.1, build 23cf638

Start Installation

[Root @ gitlab ~] # Sudo docker run-d -- restart = always-p 8080: 8080 rancher/server
# View
[Root @ gitlab ~] # Docker ps-
7bd86b0ece62 rancher/agent: v1.0.2 "/run. sh run" 2 days ago Up 2 days rancher-agent
5805e3bf5d79 rancher/agent-instance: v0.8.3 "/etc/init. d/agent-in "2 days ago Up 2 days 0.0.0.0: 500-> 500/udp, 0.0.0.0: 4500-> 4500/udp a2e6aef8-c0e6-4a6a-869d-547ba74fa310
4cd5e8cfe7dc rancher/agent: v1.0.2 "/run. sh http: // 10.10" 3 days ago Exited (0) 2 days ago pensive_carson
92d3891b0ed3 rancher/agent-instance: v0.8.3 "/etc/init. d/agent-in" 3 days ago Exited (128) 3 days ago 6a94d63e-fddb-4865-8ece-0fa3e1162165
71cf1975da89 rancher/agent: v1.0.2 "/run. sh state" 3 days ago Exited (0) 2 days ago rancher-agent-state
03510683a525 rancher/agent: v1.0.2 "/run. sh http: // 10.10" 3 days ago Exited (1) 2 days ago naughty_williams
7eccdf961671 rancher/server "/usr/bin/s6-svscan/" 3 days ago Up 2 days 3306/tcp, 0.0.0.0: 8080-> 8080/tcp
Now we access the same port 8080, for example, 10.10.239.143: 8080. You can use Chinese

Configure the user

On the System Management page, select "access control" and configure the account and password, which is very simple.

Add host

In the basic architecture --- select Add host. In the displayed dialog box, copy the 5th items and run them on the host to be added.

 


As follows:

[Root @ gitlab ~] # Sudo docker run-d -- privileged-v/var/run/docker. sock:/var/run/docker. sock-v/var/lib/rancher:/var/lib/rancher/agent: v1.0.2 http: // 10.10.239.143: 8080/v1/scripts/BBA39D3C6092C3B4B84B: 1473681600000: Random
Unable to find image 'Rancher/agent: v1.0.2 'locally
V1.0.2: Pulling from rancher/agent
5a132a7e7af1: Pull complete
Fd2731e4c50c: Pull complete
28a2f68d1120: Pull complete
A3ed95caeb02: Pull complete
7fa4fac65171: Pull complete
33de63de5fdb: Pull complete
D00b3b942272: Pull complete
Digest: sha256: sha256
Status: Downloaded newer image for rancher/agent: v1.0.2
Bytes
You can see the added host on the web page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.