RedHat7 yum 安装Docker

AS7 安装Docker 很容易,但大家视乎都没有提到,yum 安装需要注册redhat developer user才行,系统需要链接OS 开发者订阅,否则无法获取安装包及附属包:
如果注册的用户没有开发者订阅权限,则无法用yum 安装:

[root@docker ~]# subscription-manager repos --list
This system has no repositories available through subscriptions.
[root@docker ~]# subscription-manager list                                    

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.1
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:         
Ends:           

获取开发者订阅权限后(方法请参考:http://www.cnblogs.com/linuxprobe/p/5377830.html),重新登录:

[root@docker ~]# subscription-manager register [email protected] --password=*** --auto-attach --force
[root@docker ~]# subscription-manager list

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.1
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         07/26/16
Ends:           07/26/17

[root@docker ~]# subscription-manager repos --enable=rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.

So, docker 的yum 源包是在rhel-7-server-extras-rpms。直接安装即可:

[root@docker ~]# yum install -y docker

done.

你可能感兴趣的:(OS,docker)