EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 25


SIMULATION -

Configure a default software repository for your system.

One YUM has already provided to configure your system on http://server.domain11.example.com/pub/ x86_64/Server, and can be used normally.

Show Answer
Correct Answer:

To configure a default software repository for your system in this scenario, follow these steps: First, create a new repo file in the /etc/yum.repos.d/ directory. For example, use a text editor to create a file named local-rhel8.repo. Add the following content to the file: [LocalRepo_BaseOS] name=LocalRepo_BaseOS gpgcheck=0 baseurl=http://server.domain11.example.com/pub/x86_64/Server/BaseOS/ enabled=1 metadata_expire=-1 [LocalRepo_AppStream] name=LocalRepo_AppStream gpgcheck=0 baseurl=http://server.domain11.example.com/pub/x86_64/Server/AppStream/ enabled=1 metadata_expire=-1 Save and exit the text editor. After that, run the following commands to clean the YUM cache and list the repositories to ensure the new repository has been added: dnf clean all dnf repolist

Discussion

6 comments
Sign in to comment
QuangTruong
Jun 8, 2021

#dnf repolist #cd /etc/yum.repos.d #vi local-rhel8.repo [LocalRepo_BaseOS] name=LocalRepo_BaseOS metadata_expire=-1 enabled=1 gpgcheck=0 baseurl=http://server.domain11.example.com/pub/ x86_64/Server/BaseOS/ [LocalRepo_AppStream] name=LocalRepo_AppStream enabled=1 gpgcheck=0 baseurl=http://server.domain11.example.com/pub/ x86_64/Server/AppStream/ save and exit #dnf clean all #dnf repolist

urWaifu
Sep 27, 2022

I already had 1 try with the exam and you have to create a new file in /etc/yum.repos.d/ in order to use the repos and install stuff. This is the most accurate answer

sazz82
Jul 5, 2021

dnf config-manager --add-repo=http://server.domain11.example.com/pub/ x86_64/Server/BaseOs add gpgcheck=0 in the config file

gaven186
Jul 4, 2024

agree. by the way, modify gpgcheck from the config file of /etc/dnf/dnf.conf

adolfoale
Jan 17, 2021

In RHEL 8: # subscription-manager repos --list # subscription-manager repos --enable=rhel-8-for-x86_64-sap-netweaver-rpms

kenkct
Mar 1, 2022

sudo su yum config-manager --add-repo [URL] yum repolist (To obtain the Repo ID and Repo Name) yum config-manger --enable [Repo ID] vim /etc/yum.conf (edit the yum.conf to enable non-signed repo) gpgcheck=0 (:wq! save this value and quit)

Stunomatic
Nov 22, 2022

I think when we use --enable we set that repo default.

mattd81
May 11, 2022

Are we supposed to add the repo along with the other repos already installed or do we remove the other repos and only run this for the default repo?

jahmad0730
May 31, 2023

where do you get the URL for this? yum-config-manager --add-repo="XXXXXXX" ???