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 132 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

Installing Database

Sonar supports several database engines you can choose amongst.

If you simply want to make a test or a demo, you can use Apache Derby as a database. Derby is shipped with Sonar and does not need any installation. Derby is not robust nor scalable and should not be used for production.

To use one of the other databases, you simply need to create a schema and provide permissions to create, update and delete objects. Tables and indexes will then be automatically created when launching Sonar for the first time. A sample scripts to create the schema in MySQL can be found in here.

Character Set


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



Collation must be case-sensitive. It must also be accent-sensitive in Microsoft SQL Server.

Installing Sonar Server

Prior to the installation, check the requirements.

Download and unzip the distribution.

Configuring Database

If you do not use the default embedded database, edit conf/ to configure the database access. Templates are available for every supported database. Just uncomment them and comment the first four lines dedicated to derby.

  • sonar.jdbc.url : the URL of the database
  • sonar.jdbc.driver : the class of the driver
  • sonar.jdbc.user : the username (default value is 'sonar')
  • sonar.jdbc.password : the password (default value is 'sonar')

Example for MySQL:

For Oracle, copy the JDBC driver to /extensions/jdbc-driver/[YOUR DATABASE]/. Other drivers for supported database are already provided.

Starting Sonar Server

The default listen 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 into the file conf/ Here is an example to listen to http://localhost:80/sonar:

Execute the following script to start the server:

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

For advanced installation features, see:

Installing Client

The Client can be launched by 3 different kinds of analyzer:

  • No labels