title: Prerequisites and Overview
The only prerequisite for running SonarQube is to have Java (Oracle JRE 8 or OpenJDK 8) installed on your machine.
Note: On Mac OS X it is highly recommended to install Oracle JDK 8 instead of the corresponding Oracle JRE since the JRE installation does not fully set up your Java environment properly. See this post for more information.
For large teams or Enterprise-scale installations of SonarQube, additional hardware is required. At the Enterprise level, monitoring your SonarQube instance/instance-administration/java-process-memory is essential and should guide further hardware upgrades as your instance grows. A starting configuration should include at least:
The SonarQube Java analyzer is able to analyze any kind of Java source files regardless of the version of Java they comply to. But SonarQube analysis and the SonarQube Server require specific versions of the JVM.
We recommend using the Critical Path Update (CPU) releases.
Java | |
---|---|
Oracle JRE | 9 |
8 | |
7 | |
Open JDK | 9 |
8 | |
7 | |
IBM JRE | |
GCJ | |
Oracle JRockit |
Database | |
---|---|
PostgreSQL | 9.3 - 9.6 |
10 | |
Must be configured to use UTF-8 charset | |
Microsoft SQL Server | 2012 (MSSQL Server 11.0) |
2014 (MSSQL Server 12.0) with bundled Microsoft JDBC driver. Express Edition is supported. | |
2016 (MSSQL Server 13.0) with bundled Microsoft JDBC driver. Express Edition is supported. | |
2017 (MSSQL Server 14.0) with bundled Microsoft JDBC driver. Express Edition is supported. | |
Collation must be case-sensitive (CS) and accent-sensitive (AS) (example: Latin1_General_CS_AS) | |
READ_COMMITTED_SNAPSHOT must be set on the SonarQube database to avoid potential deadlocks under heavy load | |
Both Windows authentication (“Integrated Security”) and SQL Server authentication are supported. See the Microsoft SQL Server section in Installing/installation/installing-the-server page for instructions on configuring authentication. | |
Oracle | 10G |
11G with backward-compatible Oracle 12.2.x drivers | |
12C with Oracle 12.2.x drivers | |
XE Editions are supported | |
Must be configured to use a UTF8-family charset (see NLS_CHARACTERSET) | |
The driver ojdbc14.jar is not supported | |
Only the thin mode is supported, not OCI | |
MySQL | Not recommended for large instances |
5.6 | |
5.7 | |
Must be configured to use UTF8 charset and a case-sensitive (CS) collation | |
Only InnoDB storage engine is supported, but not MyISAM | |
Only the bundled mysql-connector-java jar is supported |
To get the full experience SonarQube has to offer, you must enable JavaScript in your browser.
Microsoft Internet Explorer | IE 9 |
IE 10 | |
IE 11 | |
Microsoft Edge | Latest |
Mozilla Firefox | Latest |
Google Chrome | Latest |
Opera | Not tested |
Safari | Latest |
To add Pull Request analysis to Checks in GitHub Enterprise, you must be running GitHub Enterprise version 2.14+.
To add Pull Request analysis to Code Insights in Bitbucket Server, you must be running Bitbucket Server version 5.15+.
If you’re running on Linux, you must ensure that:
vm.max_map_count
is greater or equals to 262144fs.file-max
is greater or equals to 65536You can see the values with the following commands:
sysctl vm.max_map_count
sysctl fs.file-max
ulimit -n
ulimit -u
You can set them dynamically for the current session by running the following commands as root
:
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 2048
To set these values more permanently, you must update either /etc/sysctl.d/99-sonarqube.conf (or /etc/sysctl.conf as you wish) to reflect these values.
If the user running SonarQube (sonarqube
in this example) does not have the permission to have at least 65536 open descriptors, you must insert this line in /etc/security/limits.d/99-sonarqube.conf (or /etc/security/limits.conf as you wish):
sonarqube - nofile 65536
sonarqube - nproc 2048
You can get more detail in the Elasticsearch documentation.
If you are using systemd
to start SonarQube, you must specify those limits inside your unit file in the section [service] :
[Service]
...
LimitNOFILE=65536
LimitNPROC=2048
...
By default, Elasticsearch uses seccomp filter. On most distribution this feature is activated in the kernel, however on distributions like Red Hat Linux 6 this feature is deactivated. If you are using a distribution without this feature and you cannot upgrade to a newer version with seccomp activated, you have to explicitly deactivate this security layer by updating sonar.search.javaAdditionalOpts
in _$SONARQUBEHOME/conf/sonar.properties:
sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false
You can check if seccomp is available on your kernel with:
$ grep SECCOMP /boot/config-$(uname -r)
If your kernel has seccomp, you will see:
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
For more detail, see the Elasticsearch documentation.