Install and configure SonarQube in centos 6.5
1. Download the installation package:
Http://www.sonarqube.org/downloads/
2. Upload the server and decompress it:
Unzip sonarqube-5.6.zip-d/dir
3. Install MySQL and enter mysql
3.1 mysql-u root-p3.2 create a database and an account:
mysql> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; mysql> CREATE USER 'sonar' IDENTIFIED BY 'sonar';mysql> GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';mysql> GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';mysql> FLUSH PRIVILEGES;
4. Configure the sonar parameter to connect to the mysql vi/conf/sonar. properties file.
Remove comments and add:
sonar.jdbc.url=jdbc:mysql://192.168.16.219:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformancesonar.jdbc.username=rootsonar.jdbc.password=rootsonar.sorceEncoding=UTF-8sonar.login=adminsonar.password=admin
5. Start the service directory and switch to
/Bin/linux-x86-64/directory to start the service
#./Sonar. sh start service #./sonar. sh stop Service #./sonar. sh restart service
Access http: \ ip: 9000
Tips: Sometimes, check whether iptables is blocked. You can use service iptables stop to check whether it is affected.