Below are instructions to setup a Sonarqube server in windows platform with SQL server.
1. Install SQL server 2012 or 2014.
2. Create SQL Server data base named sonar with collation settings set to case-sensitive (CS) and accent-sensitive (AS).
![image image](https://lh3.googleusercontent.com/-39VYAo-UQh0/WEEE444xP7I/AAAAAAAAH8E/kamPEThlVXU/image_thumb%25255B3%25255D.png?imgmax=800)
3 Download Java Runtime Environment 8 or later and install it. Set JAVA_HOME and JRE_HOME.
![image image](https://lh3.googleusercontent.com/-iDmWeqehxhM/WEEE6178BOI/AAAAAAAAH8M/sL5WDbHoYG4/image_thumb%25255B7%25255D.png?imgmax=800)
4. Download Sonarqube 6.1 and extract the zip file into C:\sonarqube
![image image](https://lh3.googleusercontent.com/-ZNznE6fDh-o/WEEE9FRM7eI/AAAAAAAAH8U/HKTa2H7N10k/image_thumb%25255B11%25255D.png?imgmax=800)
5. Set connection info in C:\sonarqube\conf\sonar.properties
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar
sonar.jdbc.username=sonarqube
sonar.jdbc.password=mypassword
6. In SQL Configuration Manager, enable TCP/IP for SQL network.
![image image](https://lh3.googleusercontent.com/--s7qlc5lc88/WEEFAR2T9uI/AAAAAAAAH8c/nJTEy47U4ZA/image_thumb%25255B19%25255D.png?imgmax=800)
![image image](https://lh3.googleusercontent.com/-sb5m4y_3ltE/WEEFD1XuFrI/AAAAAAAAH8k/WbXgqXLZBxc/image_thumb%25255B18%25255D.png?imgmax=800)
7. Restart SQL services
8. Run startsonar.bat in C:\sonarqube\bin\windows-x86-64, to test. This creates the tables in DB. Sonar is running.
![image image](https://lh3.googleusercontent.com/-P8i236wj_Fk/WDwHF3wavUI/AAAAAAAAH7g/_ntdGIG6bSI/image_thumb%25255B5%25255D.png?imgmax=800)
You can now browse SonarQube at http://localhost:9000 (the default System administrator credentials are admin/admin).
9. Stop by pressing ctrl+c
To install
- Install/uninstall NT service (may have to run these files via Run As Administrator):
%SONARQUBE_HOME%/bin/windows-x86-
32
/InstallNTService.bat
%SONARQUBE_HOME%/bin/windows-x86-
32
/UninstallNTService.bat
- Start/stop the service:
%SONARQUBE_HOME%/bin/windows-x86-
32
/StartNTService.bat
%SONARQUBE_HOME%/bin/windows-x86-
32
/StopNTService.bat
![image image](https://lh3.googleusercontent.com/-nQJ1v4lOwBs/WDwHHJlIWGI/AAAAAAAAH7o/1KGYL8dEUs8/image_thumb%25255B7%25255D.png?imgmax=800)
No comments:
Post a Comment