Installing SonarQube(Fail to download libraries from server)
编程技术  /  houtizong 发布于 3年前   108
1. Download and unzip the SonarQube distribution
2. Starting the Web Server
The default port is "9000" and the context path is "/". These values can be changed in <install_directory>/conf/sonar.properties:
sonar.properties
sonar.web.host=192.0.0.1
sonar.web.port=80
sonar.web.context=/sonar
Execute the following script to start the server:
• On Linux/Mac OS: bin/<YOUR OS>/sonar.sh start
• On Windows: bin/windows-x86-XX/StartSonar.bat
3. Running SonarQube as a Service
On Windows
Install/uninstall NT service (may have to run these files via Run As Administrator):
<install_directory>/bin/windows-x86-XX/InstallNTService.bat
<install_directory>/bin/windows-x86-XX/UninstallNTService.bat
Start/stop the service:
<install_directory>/bin/windows-x86-XX/StartNTService.bat
<install_directory>/bin/windows-x86-XX/StopNTService.bat
Tuning the Web Server
By default, SonarQube is configured to run on any computer with a simple Java JRE.
For better performance, the first thing to do when installing a production instance is to use a Java JDK and activate the server mode by uncommenting/setting the following line in <install_directory>/conf/wrapper.conf:
wrapper.java.additional.6=-server
On Linux
Create the file /etc/init.d/sonar with this content:
#!/bin/sh
#
# rc file for SonarQube
#
# chkconfig: 345 96 10
# description: SonarQube system (www.sonarsource.org)
#
### BEGIN INIT INFO
# Provides: sonar
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: SonarQube system (www.sonarsource.org)
# Description: SonarQube system (www.sonarsource.org)
### END INIT INFO
/usr/bin/sonar $*
Register SonarQube at boot time (RedHat, CentOS, 64 bit):
sudo ln -s <install_directory>/bin/linux-x86-64/sonar.sh /usr/bin/sonar
sudo chmod 755 /etc/init.d/sonar
sudo chkconfig --add sonar
FAQ
Failed to launch the SonarQube service on Windows platform with a LocalSystem account
modify "conf/wrapper.conf" and specify "java.io.tmpdir" as like
"wrapper.java.additional.7=-Djava.io.tmpdir= C:/Users/xxx/AppData/Local/Temp"
Or
Add Environment var: SONAR_USER_HOME
注意:执行sonar分析时会在此目录的cache文件夹保存临时文件,因此必须要有写权限,否则会报以下异常
Can not execute SonarQube analysis: Fail to download libraries from server
请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成
网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];
文章归档
文章标签
友情链接