LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-29-2018, 09:55 AM   #1
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Rep: Reputation: Disabled
RHCSA Exam Repository Question


Hi Good Morning.

I recently took RHCSA exam (3rd time). I didn't clear. Though all the questions were familiar to me, i couldn't solve Yum Repository question (2nd time) which was holding me to complete certain number of questions. I would
like to seek help from experts who cleared RHCSA exam or faced the same kind of issue. I am posting the exact question below. Please help me know the exact answer.

Q.) Create a yum repository from http://rhcert.domainX.example.com/rhel70.

-- When i click the url provided, this was the i saw:

Yum Index : http://pub/rhel7.0/X86_64/dvd.
--and bunch of files below it.

I understood that domainX.example.com is my hostname. I created a repo file under /etc/yum.repos.d as follows:

vim yum.repo
[RHEL]
name=yum repository
baseurl=http://rhcert.domainX.examole.com/rhel70
gpgcheck=0
enabled=1
wq

After this i gave certain commands as follows:
yum clean all
yum list all
yum repolist.

I could see that my repository file was created but it was not active meaning that i couldn't install or download any packages from my repository.

My question posted above might seem unusual because this is the first time i am posting a problem related to linux. I would really appreciate i was able to find the solution for this question.


Thank You.
 
Old 06-01-2018, 09:16 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,399

Rep: Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958
Quote:
Originally Posted by linuxhell View Post
Hi Good Morning.
I recently took RHCSA exam (3rd time). I didn't clear. Though all the questions were familiar to me, i couldn't solve Yum Repository question (2nd time) which was holding me to complete certain number of questions. I would like to seek help from experts who cleared RHCSA exam or faced the same kind of issue. I am posting the exact question below. Please help me know the exact answer.

Q.) Create a yum repository from http://rhcert.domainX.example.com/rhel70.

-- When i click the url provided, this was the i saw:

Yum Index : http://pub/rhel7.0/X86_64/dvd.
--and bunch of files below it.

I understood that domainX.example.com is my hostname. I created a repo file under /etc/yum.repos.d as follows:

vim yum.repo
[RHEL]
name=yum repository
baseurl=http://rhcert.domainX.examole.com/rhel70
gpgcheck=0
enabled=1
wq

After this i gave certain commands as follows:
yum clean all
yum list all
yum repolist.

I could see that my repository file was created but it was not active meaning that i couldn't install or download any packages from my repository. My question posted above might seem unusual because this is the first time i am posting a problem related to linux. I would really appreciate i was able to find the solution for this question.
Since this is for a 'certification'...have you actually read the documentation??? The RHEL knowledgebase has complete guides on how to do this...and you appear to be missing several steps. https://access.redhat.com/documentat...m_repositories
 
Old 06-02-2018, 12:03 PM   #3
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,

Thank you for your reply. I will checkout the RHEL knowledge base. I would like to know whether the steps which i followed to create a repo file under /etc/yum.repos.d are wrong? It was suggested by most of the resources.
 
Old 06-02-2018, 12:13 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,399

Rep: Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958Reputation: 4958
Quote:
Originally Posted by linuxhell View Post
Hi,

Thank you for your reply. I will checkout the RHEL knowledge base. I would like to know whether the steps which i followed to create a repo file under /etc/yum.repos.d are wrong? It was suggested by most of the resources.
..and since you don't tell us what these "most of the resources" are, how can we tell you what you missed? You were given links to the documentation from Red Hat; if you want a 'certification', that means YOU are going to have to read and understand the documentation.
 
Old 06-19-2018, 10:01 AM   #5
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Post Yum Update and Yum Install Error

Hi.

I am getting the following error when i give yum update, yum list all and yum repolist. I have the repositories created with enabled=1 in the repository file but it shows repository is not enabled when i give repolist command.


[root@localhost ~]# yum update
Loaded plugins: fastestmirror, langpacks


One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo= ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable
or
subscription-manager repos --disable=

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

--Please let me know all the possibilities that could lead to getting such an error even after creating yum local repository with valid url.


------ THANK YOU---------
 
Old 06-20-2018, 09:45 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.3
Posts: 17,537

Rep: Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420
If I understand what you did, it looks like you only created the repo files which tell the system where to find the rpms, but you did not create the repo itself ie somewhere for the rpms to live.

Try these links:
https://code.google.com/archive/p/ir...epository.wiki
https://www.certdepot.net/rhel7-set-...epository-lab/
 
1 members found this post helpful.
Old 06-24-2018, 04:42 AM   #7
goblin_rocket
LQ Newbie
 
Registered: Nov 2017
Posts: 13

Rep: Reputation: Disabled
Im currently studying for the RHCSA so not an expert but I think for this you need to mount the local repo at a mount point. You need to download the .iso file, then create a mount point, then mount the repo like this
Quote:
mount -o loop /path/to/iso/file /path/to/mount
then you create your repo file and for the baseurl it needs to point to file:///path/to/mount and you also need to either remove or delete all other repos in /etc/yum.repos.d

Are you using LinuxAcademy btw? If you are failing the exam like this I would strongly recommend it. Then again I havent passed the exam myself yet so maybe take everything im saying with a pinch of salt!
 
Old 06-25-2018, 01:57 PM   #8
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi Chris,

Thanks for the reply. I have a small doubt. The links which you sent, describe the procedure to mount the iso image first, then create a repository. In the exam point of view, there will be active url provided from which we have to create a repository which should be enable in order to download and install the packages. I am getting the above error when i create a repository with the url provided.

Thank you.
 
Old 06-25-2018, 02:00 PM   #9
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi Goblin,

Thank for your reply. I did take a course in linux academy but i was not able to get it right. In the exam, the url is alone provided. I couldn't find any iso image under the url.

Thank you.
 
Old 06-25-2018, 07:28 PM   #10
goblin_rocket
LQ Newbie
 
Registered: Nov 2017
Posts: 13

Rep: Reputation: Disabled
Hm ok, what scores did you get each time?
 
Old 06-27-2018, 10:15 PM   #11
linuxhell
LQ Newbie
 
Registered: May 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
i got 133 first time, second time i didn't get any score as i was trying to solve the yum repository question.
 
Old 06-27-2018, 10:33 PM   #12
goblin_rocket
LQ Newbie
 
Registered: Nov 2017
Posts: 13

Rep: Reputation: Disabled
Im sorry to hear that, tbh with your first score you were quite far off from the passing grade so you probably didnt know as much as you thought. I would say that you need to complete the LinuxAcademy course 100% but you also need to be able to do all the exercises & labs without having to look at the solutions, I think they advise that you spend around 2 weeks before the exam after finishing the course just practising all those daily. You might want to also check out Michael Jangs book ($28 on Amazon for Kindle version) as that has some practise problems in.

With your second attempt it sounds like there was a problem with your VM and it wasnt accessible at the end, did you reboot to check that? I hear this is a mistake quite a few people make...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHCSA exam linuxmantra Linux - Newbie 5 02-28-2015 04:45 AM
SOLVE this RHCSA EXAM Question shejin983 Linux - Newbie 3 11-29-2012 03:46 AM
how to solve this question if i face it in RHCSA EXAM ahmooody Linux - Newbie 1 03-13-2012 03:34 AM
RHCSA Exam Practice Software Question 4dailyrunner Linux - Certification 3 06-09-2011 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration