# Maintaining multiple versions of Logstash using Yum Repos

**URL:** <https://discuss.elastic.co/t/maintaining-multiple-versions-of-logstash-using-yum-repos/60011>\
**Category:** Logstash\
**Created:** [September 7, 2016, 5:33pm UTC](https://discuss.elastic.co/t/maintaining-multiple-versions-of-logstash-using-yum-repos/60011 "2016-09-07T17:33:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_McClain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_mcclain/32/8613_2.png) [@David\_McClain](https://discuss.elastic.co/u/David_McClain)\
**Post date:** [September 7, 2016, 5:33pm UTC](https://discuss.elastic.co/t/maintaining-multiple-versions-of-logstash-using-yum-repos/60011/1 "2016-09-07T17:33:56Z")

</div>

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.

E.g.  
/opt/logstash/logstash-2.3.4  
/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  
so..

/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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:39am UTC](https://discuss.elastic.co/t/maintaining-multiple-versions-of-logstash-using-yum-repos/60011/2 "2017-07-06T04:39:28Z")

</div>


