bigfix / boxes

A collection of packer templates to create vagrant boxes for building and installing IBM Endpoint Manager
Apache License 2.0
6 stars 2 forks source link

Check for and install packages required by DB2. #23

Closed paavoap closed 8 years ago

paavoap commented 8 years ago

DB2 install requires the i686 versions of the packages pam and libstdc++. Add a check and install for them.

gearoidibm commented 8 years ago

Why do we need to do any check using rpm before we call yum install, it's redundant because yum will install if it's not there and skip if it is already there.

paavoap commented 8 years ago

That's a good point. I'll remove it. Should I get rid of it on the lines above my change too, or leave those the way they are?

gearoidibm commented 8 years ago

I'd say just do your lines and verify it works. The other stuff works so no value in a refactor of it.

paavoap commented 8 years ago

Turns out it doesn't work without the checking. At least not always.

The Vagrant box bigfix/redhat70x64-db2 (used here for example https://github.com/bigfix/boxes/blob/master/vagrant/server/redhat/ready/Vagrantfile) doesn't have any repositories defined, which causes yum install to fail even for existing packages. Doing the rpm check before yum install bypasses this.

gearoidibm commented 8 years ago

OK - if the new packages you added are prerequisites for the DB2 won't the db2 install fail anyway ? Or is it a case that if this fails then you will do a manual install - so you want the VM to be provisioned in any case ?

paavoap commented 8 years ago

What I'm trying to do is run this on a clean RHEL7 VM. When I tried to run it, it prints out something like this, which led me to believe that the server install also installs DB2.

==> default: DB2 installation
==> default: DB2 will be installed using the following settings:
==> default:    DB2 instance owner: db2inst1
==> default:    DB2 fenced user: db2fenc1
...

And it then let me know that it requires the pam.i686 and libstdc++.i686 packages. This is why I'm installing them here.

The DB2 install fails if done in this script though, and after looking into this more, I realize the DB2 install is a separate script, and I should run that before running this one. And as you said, the separate DB2 install should be taking care of any DB2 dependencies.

I'll just close this.