1

I have a CentOS 6 server, and I am going to replace it with a new CentOS 7 server. I want to make sure I have everything I need on the CentOS 7 server that I used to have on the CentOS 6 server.

Does anyone have any recommendations for how to check what I have installed on my old server to make sure I have everything I need on my new server?

  • I'm struggling with how kind internet strangers are going to know your needs better than you do. Also note that requests for resources are off-topic. Could you edit your question to tighten the scope down a bit? Thank you! – Jeff Schaller Oct 29 '19 at 12:30
  • Hi Jeff, it is a somewhat shot in the dark i suppose. I hoping there is some method of checking what is currently installed/running on a server so i can make sure all the same programs etc are installed on the new one. Not my specific setup but in general if you where to upgrade your server how nest to go about making sure your new server has the same programs as your old one. – a.smith Oct 29 '19 at 12:34
1

To install the same software from one EL machine to the next, first, get a list of all installed packages on the machine that has all of the desired software that is already installed.

rpm -qa > packages.list

Next, prepend each line of output with the word, install.

sed -i 's/^/install /' packages.list

Next, create a new line at the end of the file with the word, run.

echo 'run' >> packages.list

Transfer the file to the machine that needs the same software. Finally, use yum to install the software.

yum shell packages.list

In turn, yum installs all of the software in the list if it isn't already installed.

|improve this answer|||||
  • So between the echo run and yum shell there should probably be an scp packages.list centos7@192.168.x.x:directory/to/drop/packages/in. – Daniel Nov 4 '19 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.