问题
Can we run 2 instances(2 different versions) of Sonar on same machine?
At present Sonar 3.7.3 is installed and is been used with Hudson for Sonar Reports. Now, there are some projects that run on Java 8 and Java 8 is not supported by 3.7.3 Sonar version.
So to run the Java 8 projects, I need to use the latest version of Sonar but upgradation of Sonar would impact the existing projects that run on Java 6.
So can we configure 2 Sonar instances and can configure Hudson accordingly so that both the java 6 and java 8 projects can be run for Sonar reports?
回答1:
Yes, you can. Just make sure the following variables are unique:
conf/wrapper.conf
- wrapper.ntservice.name=SonarQube[version]
conf/sonar.properties
- sonar.web.port=[unique port]
- sonar.jdbc.url=jdbc:postgresql://localhost/sonar[version] #(in case you have a postgresql db)
回答2:
If you want to run 2 instances of sonar in the same machine make sure to have uniqu values in conf/sonar.properties
for below properties.
sonar.jdbc.url=<db_url>
sonar.web.port=<default value would be 9000>
sonar.search.port=<default value would be 9001>
However, above properties are associated with below properties as well. Change them if needed accordingly,
sonar.jdbc.username=<db_username>
sonar.jdbc.password=<db_password>
sonar.web.host=<default value would be localhost>
来源:https://stackoverflow.com/questions/32558915/2-instances-of-sonar-on-same-machine