百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>数据库> Centos7系统中安装rancher配置教程
分享文章到:

Centos7系统中安装rancher配置教程

发布时间:01/15 来源: 浏览: 关键词:
Centos7系统中安装rancher配置非常的复杂了需要通过许多的命令方式来实现,今天我们来看一篇关于Centos7系统中安装rancher过程详解吧。

如果你要使用rancher,你需要安装docker,如果官网打不开,你也可以访问本站链接参考安装
当然,官网安装rancher也是比较详细的,如果你能打开,不妨看看

sysinfo
[root@gitlab ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@gitlab ~]# uname -a
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

开始安装

[root@gitlab ~]# sudo docker run -d --restart=always -p 8080:8080 rancher/server
## 查看
[root@gitlab ~]# docker ps -a
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    
现在我们同8080端口访问,如,10.10.239.143:8080,你可以选择使用中文

配置用户

在系统管理页面中---》选择访问控制----》配置下账户和密码即可,非常简单

添加主机

我们在基础架构中---》选择添加主机,在弹出的对话框中,复制第5项运行在需要被添加的主机上

 


如下

[root@gitlab ~]# sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 http://10.10.239.143:8080/v1/scripts/BBA39D3C6092C3B4B84B:1473681600000:706yqOTwCztS5FMSOsDTAAKOUtg
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:b0b532d1e891534779d0eb1a01a5717ebfff9ac024db4412ead87d834ba92544
Status: Downloaded newer image for rancher/agent:v1.0.2
e80d6270fd45db4ca4fdb441cd30716fd6fa7cd65a35cf1b9fd8dab0dfba4f7e
在回到web界面已经能够看到被添加到主机

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有23人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板