环境:
Os:Centos 7
1.下载
下载地址:
我这里下载的是sonarqube-7-7
sonarqube-7.7.zip
2.解压安装
cp sonarqube-7.7.zip /home/yeemiao/
unzip sonarqube-7.7.zip
3.修改/home/sonar/sonarqube-7.7/bin/linux-x86-64/sonar.sh
把RUN_AS_USER的注释去掉,然后填写启动该脚本的用户,比如我这里是安装在sonar用户下的
RUN_AS_USER=sonar
要是这里不修改的话,会以root的方式启动,这样的话es会报错,因为es不能使用root用户启动,所以这里需要以普通用户启动
4.启动
./sonar.sh start
启动的时候会相应启动es,有报错的看日志,按照日志的提示进行修改配置
5.web界面登陆
初始密码为admin/admin
6.配置数据库信息(这里的数据库需要提前创建好)
配置文件路径:/home/sonar/sonarqube-7.7/conf/sonar.properties
# User credentials.
# Permissions to create tables, indices and triggers must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username=usonarnew
sonar.jdbc.password=usonarnew
#----- Embedded Database (default)
# H2 embedded database server listening port, defaults to 9092
#sonar.embeddedDatabase.port=9092
#----- DEPRECATED
#----- MySQL >=5.6 && <8.0
# Support of MySQL is dropped in Data Center Editions and deprecated in all other editions
# Only InnoDB storage engine is supported (not myISAM).
# Only the bundled driver is supported. It can not be changed.
sonar.jdbc.url=jdbc:mysql://192.168.1.14:3306/sonar_new?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
7.再次启动sonar
./sonar.sh stop
./sonar.sh start
启动的过程中会创建很多的表
阅读(6157) | 评论(0) | 转发(0) |