RHEL 7 - Solution to "There are no enabled repos"
RHEL 7 - Solution to "There are no enabled repos"
今天来找bug 发表于7个月前
RHEL 7 - Solution to "There are no enabled repos"
  • 发表于 7个月前
  • 阅读 45
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 技术升级10大核心产品年终让利>>>   

摘要: 配置redhat 7.3的本地yum仓库

The error message bellow will be display on your Redhat 7 linux system after a fresh RHEL 7 system installation. It simply means that in order to get system updates and also to install new software you need to configure package repositories.

Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable


One way and the most obvious way is to use subscription-manager and follow the instructions to register your RHEL7 system and thus also enable RHEL's repos. For this you well need to have paid or trial Redhat subscription available. However, if you simply want to play around and install software without the need for up to date Red Hat subscription you can mount your downloaded redhat ISO image and make it your default local repository and be able to install software. To enable your local repository and thus overcome theThere are no enabled repos. first mount your REHL7 iso image:

[root@rhel7 ~]# mkdir /media/rhel7-repo-iso
[root@rhel7 ~]# mount /dev/cdrom /media/rhel7-repo-iso/
mount: /dev/sr0 is write-protected, mounting read-only

Now when you have your RHEL 7 iso mounted in /media/rhel7-repo-iso/ create a new yum repo file with a following content:

[root@rhel7 ~]# vi /etc/yum.repos.d/RHEL_7_Disc.repo
[root@rhel7 ~]# cat /etc/yum.repos.d/RHEL_7_Disc.repo
[RHEL_7_Disc]
name=RHEL_7_x86_64_Disc
baseurl="file:///media/rhel7-repo-iso/"
gpgcheck=0

Once ready check for new repos to enable this repository:

# yum repolist
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
RHEL_7_Disc                                                                                                                                      | 4.1 kB  00:00:00     
(1/2): RHEL_7_Disc/group_gz                                                                                                                      | 134 kB  00:00:00     
(2/2): RHEL_7_Disc/primary_db                                                                                                                    | 3.4 MB  00:00:00     
repo id                                                                      repo name                                                                            status
RHEL_7_Disc                                                                  RHEL_7_x86_64_Disc                                                                   4,305
repolist: 4,305

Now you will be able to install new software on your unregistered RHEL 7 linux box. The disadvantage is that you will not receive any new updates and this can create a security problem for your system. Furthermore, when using yum command the:

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

will be always displayed on your terminal.

共有 人打赏支持
粉丝 6
博文 185
码字总数 34076
×
今天来找bug
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: