LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2014, 01:51 PM   #1
inemetz
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
Centos equivalent of dpkg --get-selections/set-selections


I need to reinstall a Centos 6.5 server and want to reinstall all of the packages that were on there before.

In debian, you have the dpkg --get-selections > packages.lis and then dpkg --set-selections < packages.lis and then apt-get -u dselect-upgrade to reinstall everything.

What would be the equivalent process on a Centos box?

Thanks,

Irwin
 
Old 03-20-2014, 02:30 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
One way would be to retrieve a list of the installed packages with rpm:
Code:
# rpm -qa > yum.installed
then add the word "install" before any name in the list and the word "run" at the end of the file:
Code:
# sed -i 's/^/install /' yum.installed
# echo run >> yum.installed
save the list and when you are ready to install on the new machine run
Code:
yum shell yum.installed
A more advanced method is the Kickstart installation in which you can specify the list of the packages to install, among other things. Due to the length of the explanation I refer you to the official documentation here: https://access.redhat.com/site/docum...ickstart2.html
 
  


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
Menuconfig - just too many selections raypen Slackware 4 12-03-2011 11:37 PM
[SOLVED] difference between dpkg -l and dpkg -get-selections austinium Debian 2 08-02-2011 07:12 AM
Set the status of "purge" packages - dpkg --get-selections kushalkoolwal Debian 7 01-09-2009 12:48 PM
Dpkg/dselect database mess up: Reset selections!! ignasiet Debian 4 05-22-2007 05:28 AM
dpkg --get-selections still shows deinstall pljvaldez Debian 0 02-17-2006 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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