How do I install the same RPM packages on a new server as an old?

~ 0 min

First you need a list of the packages on the old server.

rpm -qa --qf "%{NAME}\n" > rpmlist.txt


Copy this file to the new server (for example using SSH).


To bulk install all of the packages installed on the old server

yum install `cat rpmlist.txt|tr '\n' ' '`


You should then be prompted to install all packages missing on the new server.

Tags: copy, install, rpm, ssh, yum
Average rating 0 (0 Votes)

You cannot comment on this entry