Understand the default configuration
NOTE: Starting with SonarQube 7.8-2, MySQL is replaced with PostgreSQL as database since Sonarqube no longer support MySQL. You can find more information about this change in the link below:
https://community.sonarsource.com/t/end-of-life-of-mysql-support/8667
SonarQube developed a tool to migrate data from MySQL to one of the other supported databases. Find more information in the link below:
The SonarQube installation folder is located in installdir/apps/sonarqube/, which has the following contents:
Directory | Content |
---|---|
conf/ | SonarQube’s Apache configuration files. |
sonarqube/ | SonarQube’s files. |
sonarqube/bin/ | SonarQube’s binaries. |
sonarqube/conf/ | SonarQube’s configuration files. |
sonarqube/data/ | SonarQube’s data. |
sonarqube/… | |
scripts/ | Scripts to manage SonarQube’s service. |
Analyze your first project with SonarQube Scanner
To get started with the Bitnami SonarQube Stack and SonarQube Scanner, you can follow this two-minute quickstart guide to analyze a sample project:
Linux and Mac OS X
-
Download the SonarQube Scanner zip file. You can find it for all platforms on this link.
-
Unzip it in /opt:
$ sudo unzip -d /opt sonar-scanner-cli-*.zip
-
Download some sample projects from this link.
-
Unzip them in $HOME/sonar-scanning-examples:
$ unzip -d $HOME master.zip
-
Analyze a project as shown below. Replace the USERNAME and PASSWORD placeholders with the correct user name and password.
$ cd $HOME/sonar-scanning-examples/sonarqube-scanner $ /opt/sonar-scanner-*/bin/sonar-scanner -Dsonar.login=USERNAME -Dsonar.password=PASSWORD
-
Browse to http://localhost to find out the results. (localhost is a placeholder. Please, replace it with the actual domain of your SonarQube server).
Windows
-
Download the SonarQube Scanner zip file. You can find it for all platforms on this link.
-
Unzip it in C:\sonar-scanner.
-
Download some sample projects from this link.
-
Unzip them in %HOMEPATH%\sonar-scanning-examples.
-
Analyze a project as shown below. Replace the USERNAME and PASSWORD placeholders with the correct user name and password.
$ cd %HOMEPATH%\sonar-scanning-examples\sonarqube-scanner $ C:\sonar-scanner\bin\sonar-scanner.bat -D sonar.login=USERNAME -D sonar.password=PASSWORD
-
Browse to http://localhost to find out the results. (localhost is a placeholder. Please, replace it with the actual domain of your SonarQube server).
You can find more information about SonarQube Scanner at SonarQube’s official documentation.