Sonar is made of 3 components:
Sonar supports several database engines.
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.
When creating a database, the recommended character set is UTF-8. |
If you're not using the default embedded database, you need to edit conf/sonar.properties 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):
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).
The default 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 in the file conf/sonar.properties:
sonar.web.host: 192.0.0.1 sonar.web.port: 80 sonar.web.context: /sonar |
Execute the following script to start the server:
You can now browse to http://localhost:9000.
There are different clients available for launching analyses: