LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 01-03-2011, 01:01 PM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Mirror software packages from one server to another


Server A is running Centos 5.5, Server B is running Centos 5.5.

What is the simplest way to grab the package list from Server A, and use yum/rpm to make sure that the same packages are installed on server B, and if not -- install them?
 
Old 01-03-2011, 01:42 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
rpm -qa --qf "%{NAME}\n" | tr '\n' ' ' > /tmp/packages.txt
Transfer over packages.txt
Code:
yum install $(cat packages.txt)
(Actually, I wonder if `rpm -qa --qf "%{NAME} "` will work, making the tr unnecessary. Don't have a RedHat-based distro in front of me)
 
1 members found this post helpful.
  


Reply



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
Command to create local mirror of Alien Bob's kde4.4.0 packages damgar Slackware 5 02-11-2010 11:41 AM
Problem with packages - local list doesn't list all packages from a mirror simopal6 Debian 2 09-01-2008 04:44 AM
Keeping a local mirror of packages current KaYoS Slackware 14 10-23-2007 05:25 AM
LXer: Burning Debian packages and repositories to disc with APTonCD and apt-mirror LXer Syndicated Linux News 0 07-03-2007 06:01 PM
other mirror for packages for sources.list jasmith Yoper 1 11-12-2004 02:22 AM

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

All times are GMT -5. The time now is 11:06 AM.

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
Open Source Consulting | Domain Registration