0

Is it possible to execute one script which reads through a file containing a list of packages/applications, tests if each entry is already installed and if not, proceed to install?

I'm trying to find an approach which I can use in installing applications on a number of virgin servers autonomously.

sisko
  • 341
  • 2
  • 4
  • 12
  • 2
    You could use dpkg --get-selections > selections on one computer then dpkg --set-selections < selections on the other servers. Also, check http://unix.stackexchange.com/questions/7364/how-do-i-migrate-configuration-between-computers-with-different-hardware/7397#7397 http://unix.stackexchange.com/questions/79125/reinstalling-all-debian-packages/79165#79165 http://unix.stackexchange.com/questions/8272/what-i-can-i-do-to-make-the-transition-to-some-new-computer-hardware-safe-and-sm/9400#9400 etc.) – fredtantini Jun 01 '15 at 09:55
  • Yes, but package management depends on the distribution, so you need to tell us which distribution you're using. – Gilles 'SO- stop being evil' Jun 01 '15 at 22:11

2 Answers2

0

I recommend you to try out Ansible. It's agentless, the only requirement is that your servers are SSH accessible from a host running Ansible (you also need python executable on servers, but you can even automate its installation on the bootstrap).

yaegashi
  • 12,326
0

If you're installing "virgin" servers I highly recommend FAI, Fully Automatic Installation, which is designed to set up any number of systems with a pre-defined set of packages and configuration files.

Once the systems are set up, I second yaegashi's recommendation to try out Ansible.

Stephen Kitt
  • 434,908