Solved

Yum install from text file not working

Posted on 2014-11-12
9
264 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
9 Comments
 
LVL 61

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 61

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
 
LVL 61

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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 28

Accepted Solution

by:
serialband earned 500 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 61

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
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.

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now