Skip to content

image-20230624080743854

这里看到Process[ce] is up说明,sonarQube程序已经启动成功了。

访问: http:cd/data/devops6## 下载包wgethttps:## 解压unzipsonar-scanner-cli-4.8.0.2856-linux.zip## 设置环境变量vim/etc/profileexportSONAR_SCANNER_HOME=/data/devops6/sonar-scanner-4.8.0.2856-linuxexportPATH=$SONAR_SCANNER_HOME/bin:$PATHsource/etc/profile## 测试生效[root@Devops6 sonar-scanner-4.8.0.2856-linux]# sonar-scanner -vINFO:Scannerconfigurationfile:/data/devops6/sonar-scanner-4.8.0.2856-linux/conf/sonar-scanner.propertiesINFO:Projectrootconfigurationfile:NONEINFO:SonarScanner4.8.0.2856INFO:Java11.0.17EclipseAdoptium(64-bit)INFO:Linux3.10.0-957.el7.x86_64amd64

image-20230624083122181

⚠️ 注意JDK版本

这里请注意JDK版本的问题, 默认安装的sonarscanner是使用自带的jdk。通过上面的显示可以发现是jdk1.11版本, 如果想使用系统默认的jdk版本,可以修改scanner可执行程序的配置。如下所示:

https:at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:155)at org.sonar.core.util.DefaultHttpDownloader.download(DefaultHttpDownloader.java:150)at org.sonar.server.plugins.PluginDownloader.downloadRelease(PluginDownloader.java:152)at org.sonar.server.plugins.PluginDownloader.download(PluginDownloader.java:126)... 47 common frames omittedCaused by:java.net.SocketTimeoutException:Read timed out

安装包下载

  • 安装包下载链接:

https:--rm\-eSONAR_HOST_URL="http:-eSONAR_LOGIN="myAuthenticationToken"\-v"${YOUR_REPO}:/usr/src"\sonarsource/sonar-scanner-cli

关于项目参数可以参考:https:

版权:此文章版权归 One 所有,如有转载,请注明出处!

链接:可点击右上角分享此页面复制文章链接

上次更新时间:

最近更新