Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: more wording tweaks

...

  1. A Database that stores the configuration and results of quality analysisanalyses
  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 make run a quick test or do a demo, you can use the H2 (Apache Derby prior to Sonar 3.2)  as a database. database that's shipped with Sonar and doesn't require any installation on your part. However, H2 (Derby prior to Sonar 3.2) is shipped with Sonar and does not need any installation. This database must not be used for production.

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

Note
titleCharacter Set

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

...

Configuring Database

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

...

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

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

Starting Sonar Server

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

Code Block
sonar.web.host : 192.0.0.1
sonar.web.port: 80
sonar.web.context: /sonar

...

Advanced Installation Features

Anchor
InstallingClient
Installing Client

There are different kinds of client to launch analysisclients available for launching analyses: