下载地址:http://www.sonarqube.org/downloads/
1.下载好sonarqube后,解压打开bin目录,启动相应OS目录下的StartSonar。如本文演示使用的是win的64位系统,则打开D:\sonar\sonarqube-5.3\sonarqube-5.3\bin\windows-x86-64\StartSonar.bat
sonar启动报错 (
sonarqube-9.1.0.47736 跟 java 8 不兼容)
--> Wrapper Started as Console
Launching a JVM...
Unrecognized option: --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
JVM exited while loading the application.
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
下载java 11
运行仍然报错:
2021.10.09 15:07:31 ERROR es[][o.e.b.Bootstrap] Exception
org.elasticsearch.http.BindHttpException: Failed to bind to 127.0.0.1:9001
2.启动浏览器,访问http://localhost:9000,如出现下图则表示安装成功。
Sonar一个Web系统,展现了静态代码扫描的结果,结果是可以自定义的 ,支持多种语言的原理是它的扩展性