LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-05-2014, 03:01 PM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Rep: Reputation: Disabled
centos rpm load


hi

I got a huge list of rpms (1500 of them) that I need to load in the server. Is there a simple way to do this? install both it and their dependencies etc?

thanks
 
Old 11-05-2014, 04:15 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Where exactly did you get these rpms? Why aren't you using a yum and getting what you need from CentOS repositories? It is important make sure the rpms you get are for the Linux distribution and version of same you're using. You can't just install any rpm on CentOS. (e.g. If you found Fedora 20 rpms they would almost certainly not work on CentOS 5.) Generally speaking rpms are designed for a specific distribution and version. (On the flip side most of what is designed for CentOS will work on RHEL of the same version and vice-versa because CentOS is designed to be a binary compile from RHEL source.)

Yum will address dependencies automatically so long as it can find them in the repositories you're using. This is the main point in yum - it prevents the "dependency hell" people used to get when trying to install packages with rpm.

You can actually install multiple rpms at the same time with "rpm -ivh *rpm" if they're all in the same directory but I don't know if it would build a long enough command to contain 1500 of them before it puked on you. If it will and the dependencies are satisfied it will see that it is in the list and won't complain about it. (That is if you install 2 or more rpms with the same command line that command line will see the dependency if it is one of the rpms in the command line.)

However, as noted you really ought to be doing this using yum. 1500 is one heck of a lot of rpms and it sounds almost as if you're trying to change the entire system.
 
1 members found this post helpful.
Old 11-05-2014, 04:20 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
If the dependencies for the packages are in the repository, yum should be able to install the packages with their dependencies.

Step 1. Make a short list of rpms installed on your system. The sole purpose of the list is to get an idea of the format of the list that yum needs.

So: in a console, run,
Code:
yum list installed > installed.txt
then interrupt the listing with a ctrl-c. You just need an idea of how to format your list of 1500 rpms.

Step 2. To install the rpms from the list of 1500, using yum, edit the list so that it matches the format of the list you produced with yum in step one above. Once the list is ready, install the entire list, using yum:
Code:
yum -y install $(cat installed.txt)
As to the dependencies, you may be able to determine whether or not you will have dependency problems by running something like:
Code:
repoquery --requires --recursive --resolve $(cat installed.txt)
If it works, you can get an early warning of which packages will have problems, and reserve them for installation after the bulk of the list is installed.

I don't know about that last. I've never tried it.
 
1 members found this post helpful.
Old 11-05-2014, 04:26 PM   #4
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
thanks guys, we are duplicating an offsite server. but the hardware is different and our OS is newer so we can't just dd or norton ghost it. i will try the yum command and see how it goes. thanks
 
Old 11-05-2014, 04:33 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,830

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
Also be AWARE that centOS is ONLY supporting the current minor versions
CentOS 5.11
CentOS 6.6
CentOS 7.0
only these three are supported
 
Old 11-05-2014, 05:18 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Quote:
Originally Posted by jzoudavy View Post
thanks guys, we are duplicating an offsite server. but ... our OS is newer
As was asked above, where did you get these rpms? If you're running a different OS, then you cannot install the same RPMs that are on the offsite server, you need to install versions of those programs for your OS. The best place to get them would be through the standard repository for your OS - yum.

Also, why are you trying to duplicate an offsite server to a machine running a newer OS? The idea is fundamentally flawed...if it's a different OS, then it's running different packages of different versions, often with incompatible config files, locations, etc. If you want to use the offsite server as a reference for setting up a new machine with similar functionality, that's a very different topic, and you would not be asking how to install a block of 1500 unknown RPMs.
 
Old 11-06-2014, 10:04 AM   #7
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 180

Original Poster
Rep: Reputation: Disabled
we have just the list of the name of the rpms. not the actual rpm packages. the actual rpm packages will be grabbed from the installation CD. we are actually aiming to duplicate the functionality of the offsite server. but our offsite team is not being very helpful in terms of giving us the requirements.
 
Old 11-06-2014, 12:06 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Quote:
Originally Posted by jzoudavy View Post
we have just the list of the name of the rpms. not the actual rpm packages. the actual rpm packages will be grabbed from the installation CD.
That won't work. Different OS means different package versions, which means a different RPM name. If it was just a few you could peel off the version information and extract the actual package name, and then use yum to install it, but for 1500 of them that's going to be a royal pain.
 
Old 11-06-2014, 02:21 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,830

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
also the intall CD is a NET install
or a live image that is squeezed onto a 700 MEG CD

there really are NO rpm's on the cd
 
  


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
CentOS seem high load allenlow Linux - Newbie 3 11-30-2010 10:19 AM
Need to load KDE rpm - RHEL 5 pyroman59 Linux - Newbie 8 12-18-2009 12:18 PM
Xwindows will not load -- centos 4.4 ihopeto Linux - Desktop 2 11-19-2008 06:11 PM
Load driver on first install using RPM package wizznew Linux - Hardware 1 11-10-2005 02:39 AM
RPM Down Load problem on RHN imsajjadali Red Hat 0 01-22-2004 11:45 PM


All times are GMT -5. The time now is 10:38 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