We encountered this problem in the development. We use Chef to automatically run Yum install to install a software package (called Logstash) from yum repo. This software needs to run as two instance in our design, one is agent and the other is server. In the production environment, because the system is distributed, agent and server are usually in two systems, so there is no problem.
However, our development environment has only one server. if we want to simulate the agent client mode, we need to install the software twice to different paths and then start it separately. is there any good way to install the software twice through yum without changing our design? one is /opt, the other is normal /usr/local/share, and the other is not considering complicated situations such as service installation.
Update: It seems that Yum can hardly achieve this goal, so Chef can add different configurations to logstash according to different environments, because our input filter and output configurations are written separately. In fact, it is easy to add them to logtash in the development environment so that it can be both an agent and a server.
I think you should beThink the wrong way, you should change the configuration file of Logstash instead of installing it twice.