SYS: Manage repositories.

Share this link

It is perfectly possible to point at several software repositories at the same time.
To better deal with this situation, you need to use the yum repolist and yum-config-manager commands.

To get the list of all the available repositories (enabled and disabled), type:

# yum repolist all
...
repo id                       repo name                           status
base/7/x86_64                 n40l - Base                         enabled: 8,465
epel/x86_64                   Extra Packages for Enterprise Linux disabled
repolist: 8,465

Note: The -v option displays even more details.

To get the list of the enabled repositories, type:

# yum repolist
...
repo id                repo name                                          status
base/7/x86_64          n40l - Base                                        8,465
repolist: 8,465

To get the list of the disabled repositories, type:

# yum repolist disabled
...
repo id                       repo name
epel/x86_64                   Extra Packages for Enterprise Linux 7 - x86_64
repolist: 0

To permanently enable a repository (here epel), type:

# yum-config-manager --enable epel

To permanently disable a repository (here epel), type:

# yum-config-manager --disable epel

To temporary enable a repository (here epel) in order to install a specific package (here Pound), type:

# yum --enablerepo=epel install Pound

Note: Use the –disablerepo option to temporary disable a repository.

Source: Inspired from an ITSprite tutorial about the yum repolist command.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

2
Leave a Reply

Please Login to comment
1 Comment threads
1 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
CertDepotscruff Recent comment authors
  Subscribe  
newest oldest
Notify of
scruff
Member
scruff

Hi there,
During the exam, am I allowed to delete the old content of folder rm -rf /etc/yum.repos/* and put a new repofile, lets say myrepository.repo and put repository link into it?

RHCSA7: Task of the day

Allowed time: 15 minutes.
Get an iso image of CentOS 7 (or a DVD) and set up a local repository.

RHCE7: Task of the day

Allowed time: 15 minutes.
Configure a Samba server called MYSERVER, belonging to the MYGROUP group, sharing the /shared directory with the name "shared".

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...