前几天(愚人节前一天),redhat宣布开发者可以免费订阅最新的RHEL(听到这个消息当时还以为是愚人节的玩笑),不过只能用于开发环境^^
官方还出了个教程:http://developers.redhat.com/products/rhel/get-started/
作为企业级的Linux发行版,RHEL系列的稳定性和安全性毋庸置疑,不过高服务也就意味着高收费,现在开发者可以免费订阅(一年)。
最小化安装并订阅登录
先说安装,与CentOS和Ubuntu的安装方式不同,RHEL7安装后还需要订阅账户登录后才能正常使用。安装过程就不再赘述,这里记录下Minimal最小化安装后,命令行中激活订阅方式:
RHEL独有的订阅管理subscription-manager
命令,看一下帮助信息:
[root@localhost ~]# subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]
Primary Modules:
...
register Register this system to the Customer Portal or another subscription management service
...
按照帮助信息,登录命令是:
[root@localhost ~]# subscription-manager register
根据提示输入账号密码:
[root@localhost ~]# subscription-manager register
Registering to: subscription.rhn.redhat.com:443/subscription
Username: XXXX@XXX.XX
Password:
The system has been registered with ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
提示如上说明订阅登录成功。
配置软件仓库
验证可以访问的软件仓库:
[root@localhost ~]# subscription-manager repos --list-enabled
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID: rhel-rs-for-rhel-7-server-eus-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) - Extended Update
Support (RPMs)
Repo URL: https://cdn.redhat.com/content/eus/rhel/server/7/$releasever/$basearch/resilientstor
age/os
Enabled: 1
Repo ID: rhel-ha-for-rhel-7-server-eus-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) - Extended Update
Support (RPMs)
Repo URL: https://cdn.redhat.com/content/eus/rhel/server/7/$releasever/$basearch/highavailabil
ity/os
Enabled: 1
Repo ID: rhel-7-server-eus-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Extended Update Support (RPMs)
Repo URL: https://cdn.redhat.com/content/eus/rhel/server/7/$releasever/$basearch/os
Enabled: 1
Repo ID: rhel-7-server-rt-beta-rpms
Repo Name: Red Hat Enterprise Linux for Real Time Beta (RHEL 7 Server) (RPMs)
Repo URL: https://cdn.redhat.com/content/beta/rhel/server/7/$basearch/rt/os
Enabled: 1
Repo ID: rhel-rs-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/resilientsto
rage/os
Enabled: 1
Repo ID: rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled: 1
Repo ID: rhel-ha-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/highavailabi
lity/os
Enabled: 1
Repo ID: rhel-7-server-rt-rpms
Repo Name: Red Hat Enterprise Linux for Real Time (RHEL 7 Server) (RPMs)
Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/rt/os
Enabled: 1
激活附加软件仓库:
[root@localhost ~]# subscription-manager repos --enable rhel-server-rhscl-7-rpms
Repository 'rhel-server-rhscl-7-rpms' is enabled for this system.
[root@localhost ~]# subscription-manager repos --enable rhel-7-server-optional-rpms
Repository 'rhel-7-server-optional-rpms' is enabled for this system.
添加第三方epel源
以阿里镜像源为例:
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
更新重启:
[root@localhost ~]# yum -y update
[root@localhost ~]# reboot