Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 153 Next »

Table of Contents


Sonar is made of 3 components:

  1. A Database that stores the configuration and results of quality analysis
  2. A Web Server that is used to navigate the results of the analyzes and make configuration
  3. A Client that will run source code analyzers to compute data on projects
To make sure to you're setting up a performant Sonar ecosystem, have a look at the Enhancing Performance documentation page.

Installing Database

Sonar supports several database engines you can choose amongst.

If you simply want to run a quick test or do a demo, you can use the H2 (Apache Derby prior to Sonar 3.2) database that's shipped with Sonar and doesn't require any installation on your part. However, H2 (Derby prior to Sonar 3.2) must not be used for production.

To use one of the other databases, you simply need to create a schema and a sonar user and give the user permissions to create, update and delete objects in the schema. Tables and indexes will be created automatically when you launch Sonar for the first time. A sample script to create the schema and the user and to grant the necessary permissions in MySQL can be found here.

Character Set


When creating a database, the recommended character set is UTF-8.

Installing Sonar Server

  1. Prior to the installation, check the requirements.
  2. Download and unzip the distribution (note that native packages are also available for Linux distributions, see this documentation page for more details).

Configuring Database

If you're not using the default embedded database, you need to edit conf/ to configure the database properties. Templates are available for every supported database. Just uncomment and configure the template you need and comment out the lines dedicated to H2 (Derby prior to version 3.2):

  • sonar.jdbc.url: the URL of the database
  • sonar.jdbc.driver: the class of the driver
  • sonar.jdbc.user: the username
  • sonar.jdbc.password: the password

For Oracle, copy the JDBC driver to /extensions/jdbc-driver/[YOUR DATABASE]/.

Drivers for the other supported databases are already provided. (Do not replace the provided drivers; they are the only ones supported).

Starting Sonar Server

The default port is 9000, the default context path is / and Sonar listens by default to all network interfaces: ''. Once launched, the Sonar web server is available on http://localhost:9000. Parameters can be changed in the file conf/

Execute the following script to start the server:

You can now browse to http://localhost:9000.

Advanced Installation Features

Installing Client

There are different clients available for launching analyses:

  • No labels