I am working on converting my stack installation/standup processes from using the tar files over to using the Yum repos provided, but am running into some flexibility issues.
I keep a directory - /opt/logstash - as the entry point into my logstash installation.
From there, I have a logstash-X.X.X/ directory, and a symlink 'current' which points to it.
/opt/logstash/current -> logstash-2.3.4
This allows me the flexibility of installing multiple versions of Logstash if necessary. Not that I necessarily need multiple versions, but being able to have an untouched installation to revert to in times of upgrade is nice - I like the safety net. More than that, I like having control over my installations. I see this as similar to how one can manage multiple Java versions installed onto the same system.
My initial attempt to install via repo was to use the --installroot option for yum.
Referring to the example above:
yum --installroot=/opt/logstash/logstash-2.4.0/ install logstash
This attempted to install logstash into that directory, but for some reason could not find any core dependancies installed on the system, and I ended up with a very weird installation of dependancies inside that path, AND the logstash package failed to install.
My next attempt was to create /opt/logstash as a symlink and point it to the final install path that I want to install to
/opt/logstash -> logstash-2.4.0
This works to successfully install logstash into the target directory, however, shifting the link a little and making it..
/opt/logstash -> logstash-2.3.4
Results in yum telling me that logstash-2.3.4-1 is already installed.
Package matching 1:logstash-2.3.4-1.noarch already installed.
So I try:
yum erase logstash-2.3.4-1
and yum says:
Package(s) logstash-2.3.4-1 available, but not installed.
Should I not try to use the repos? It seems like you're allowed no flexibility in how you install if you do use them.