Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an existing CentOS installation which I'd like to install extra packages to. The packages to be installed were supplied to me in a list, one package per line, which looks like:

....
Cluster_Administration-en-US.noarch
ElectricFence.x86_64
GConf2.i386
GConf2.x86_64
GConf2-devel.i386
GConf2-devel.x86_64
Global_File_System-en-US.noarch
ImageMagick.i386
...

Using this text file, is there a way to install every package listed? I suspect the list is actually a list of 'all' packages which could have been installed when the operating system was originally set up.

share|improve this question
add comment

2 Answers

You can also try this in command line.

for i in `cat textfile` ; do yum -y install $i; done

For every i in textfile, it does a yum -y install.

share|improve this answer
    
as Mafcin stated above this will do dependency check on every package ie. for each line. –  FayadF Sep 7 '12 at 13:54
add comment

Yes, do this:

yum -y install $(cat file_name)

share|improve this answer
    
This is much nicer, as it will look at all the dependencies at the same time, instead of figuring them out for every single package. –  Marcin Sep 6 '12 at 14:01
    
yes, that's true. –  FayadF Sep 7 '12 at 13:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.