Centos7.5 安装sonarqube-7.1
下载sonarqube-7.1
wget -t 0 -c https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.1.zip
解压至 /usr/local/sonar,进入该目录下。
cd usr/local/sonar;
修改配置文件
vi conf/sonar.properties
修改以下配置
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.port=9090
Centos7.5上面已安装好jdk1.8和mysql5.7并执行初始化相关脚本。
# root密码为dbpasswd
mysql -uroot -pdbpasswd;
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES;
Centos7.5上面建立sonar账户启动sonar.
usradd sonar;
cd /usr/local/sonar;
./bin/linux-x86-64/sonar.sh start
启动完成后,第一次启动比较慢,直接访问 http://192.168.10.22:9090 (Centos7.5 Ip 为 192.168.10.22)