简体   繁体   中英

Running two different Jenkins versions on same Linux Cent OS VMs

I have one Jenkins version running on port 8080 in my CentOS VM. I want to install another Jenkins version on a different port but on the same CentOS VM. How could I do that? Btw I usually start my jenkins using command 'sudo service jenkins start'.

You need a different JENKINS_HOME and a different port . To be safe, also a different binary location (if you autoupdate, issues otherwise). You do not need to build your own binary.

java -DJENKINS_HOME=/path/to/configs -jar jenkins.war --httpPort=8100

There's info on the.net as to how to change depending how you installed/what's your service wrapper, eg: Manage multiple service instances with systemctl

The linked example for systemctl suggest one service file can be used to manage different instances but it still invokes different conf. We still use init.d so, it's two files in init.d , with the different names (Jenkins_A, Jenkins_B), and different values; pretty rudimentary but functional. Ultimately is the same effect. We do the same for multiple other tools (eg:Nexus, SonarQube), too.

Also, this question also best asked/answered on Superuser SE in a more general context (eg: this ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM