?
Solved

Yum install from text file not working

Posted on 2014-11-12
9
Medium Priority
?
328 Views
Last Modified: 2014-12-02
RHEL 6.3 - No RHN subscription.   I am trying to install packages from a local repo created from the mounted DVD.  

# yum repolist shows the repo listed correctly

I have a text file with a list of the packages I need to install.  I ran the following command to install each of the listed packages:

yum -y install $(cat yumtest.txt)

All the packages show as "available", but nothing actually installs (See screenshot).  I was able to get this to work successfully once in the past, but can't figure out why it no longer works.  The result from the command is "Nothing to do"

If I try and run yum once for each package manually, the packages install correctly.

Any ideas would be appreciated.

Thanks!
yumtest.txt
yum.jpg
0
Comment
Question by:CipherUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40438613
That is illegal according to redhat.
Legal is to configure CentOS or Oracle public-yum repos and convert to free system
0
 

Author Comment

by:CipherUser
ID: 40438635
Updating packages off of the RHEL install DVD using yum is illegal?  I'm not trying to get updates.  I'm just trying to add some packages that didn't get installed during the initial GUI installation.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40438683
Redhat licence mentions it is to be used only with valid subscription.
CentOS and Oracle Linux does not have such ripoffs hidden between lines.
0
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 
LVL 62

Expert Comment

by:gheist
ID: 40438778
Since you are installing Oracle DBMS requirements I see no sane reason of not using Oracle Linux 6.6
0
 

Author Comment

by:CipherUser
ID: 40438831
I'm aware that there are other variants/flavors of Linux that would make this a non-issue, but using RHEL is the only option in this test/dev scenario.   Does anyone have an answer to my original question about why using YUM to install from a text file isn't working?

gheist - I appreciate your feedback, but it's not addressing my question.  Can you suggest an easy way to install multiple packages from the original DVD after the original installation has been completed, preferably from the CLI?

Thanks!
0
 
LVL 30

Accepted Solution

by:
serialband earned 2000 total points
ID: 40438852
http://fritshoogland.wordpress.com/2012/05/26/using-your-dvd-as-a-yum-repository-on-a-rpm-based-linux/

To get yum use the DVD as a repository, add a file ‘rhel-dvd.repo’ in /etc/yum.repos.d with the following content:

[dvd]
name=Red Hat Enterprise Linux Installation DVD
baseurl=file:///media/Server
enabled=0

The added repository is named ‘dvd’, and is disabled. In order to use this repository, add ‘–enablerepo=dvd’ to use it. This way it doesn’t interfere with anything, like someone adding a web-based (“real”) repository.
Using the repository

Now you can add packages, which dependencies are resolved by yum using:

# yum install --enablerepo=dvd packagename
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 40438872
try this:

cat yumtest.txt | while read mypkg
do
    yum -y install $mypkg
done
0
 
LVL 62

Expert Comment

by:gheist
ID: 40439249
So pay up your  policy. No Idea why you dont want developer subscription, but instead choose to misappropriate copyrighted software.
RHEL Developer subscription costs 99$/year, EUS 300$/year AUS 500$/year
And you need latest because of your love of old versions.
0
 

Author Closing Comment

by:CipherUser
ID: 40476803
The solution, though helpful, never addressed my original question.
0

Featured Post

Amazon Web Services EC2 Cheat Sheet

AWS EC2 is a core part of AWS’s cloud platform, allowing users to spin up virtual machines for a variety of tasks; however, EC2’s offerings can be overwhelming. Learn the basics with our new AWS cheat sheet – this time on EC2!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question