[CentOS] CentOS 4 post installation of all packages

Fri Jul 15 18:21:05 UTC 2005
Phil Schaffner <Philip.R.Schaffner at nasa.gov>

On Fri, 2005-07-15 at 18:33 +0100, Lee W wrote:
> dan1 wrote:
> 
> > Hello.
> >
> > I have installed CentOS 4 on a server in a hosting company and I 
> > realise that not all packages have been installed.
> > I would like to install all packages exactly like it is when we click 
> > on 'install everything' from the CentOS 4 installation.
> > Is there a way of doing so with 'yum install' something ? My goal is 
> > to have the exact replicate as the default CentOS 4 'install 
> > everything' option.
> > I am in fear that there would be other packages installed than only 
> > the ones from the default CentOS install by typing 'yum install *' if 
> > this is possible.
> >
> > Thanks,
> > Daniel
> 
> 
> Hi Daniel,
> 
> If the server has the DVD in the drive could you not simply do:-
> 
>   rpm -Uvh *.rpm

That sounds like the same problem as running 'yum install *' only worse.
Would certainly run into problems with kernels and glibc i386/i686
versions with this approach.

If you have access to a clean "everything" install do

# rpm -qa | sort > all_rpms

On the hosted machine do

# rpm -qa | sort > installed_rpms

Doing

# diff all_rpms installed_rpms > needed_rpms

will tell you the packages you need.  Will take a bit of editing and/or
filter magic on the diff output to get rid of "garbage" (should be "< ")
characters.   Then do

# yum install `cat needed_rpms`

Phil