Cheng Renquan wrote:
On Tue, Dec 2, 2008 at 10:02 AM, Michael Clark <[EMAIL PROTECTED]> wrote:
Hi,
I have a yum question that is probably very basic for a lot of the
fedora/centos users out there. How do I clone all of the installed
packages from one machine to another. e.g. on debian I would do this:
machine a:
dpkg --get-selections > package.list
machine b:
dpkg --set-selections < package.list
apt-get dselect-upgrade
How do I do this with yum?
How about this?
machine a:
rpm -qa > package.list
machine b:
yum install $(<package.list)
Thanks. I'll give that a try.
I thought of initially but my worry was that the output from rpm -qa
includes the fully qualified package name and version so if the exact
version is not in the repository it might not work (e.g. machine A has
not been updated or is on a different minor release which is the case
for me). Perhaps yum recognizes this and fetch the latest version anyway?
dpkg --get-selections just returns the package names. grepping the
package name from rpm -qa looked problematic as I guess you need to
determine the last hyphen or some such to strip it and get just the
package name?
I was thinking instead something more along the lines of:
yum list installed | awk '{ print $1; }'
_______________________________________________
Slugnet mailing list
[email protected]
http://wiki.lugs.org.sg/LugsMailingListFaq
http://www.lugs.org.sg/mailman/listinfo/slugnet