Tools and Technologies used in this article :

  1. Sonar 3.5.1


1. Download and Install Sonar

Download Sonar 3.5.1 and extract the same in your local directory.

Note : Name of the folder / directory where you have unzipped Sonar should not start with digit.


2. Start Sonar Server

Open the terminal and execute the command '<sonar-installation-directory>bin/macosx-universal-64/ console'.

Note : Sonar provides different scripts for different operating systems. Based on your OS execute the corresponding script available inside 'bin' folder. For example, if you have Windows-X86 32 bit machine, then execute '<sonar-installation-directory>/bin/windows-x86-32/StartSonar.bat' to start Sonar.

Once started, Sonar application will be available on http://localhost:9000. Sonar by default runs on Jetty Webserver and uses embedded database H2.


3. Configure

Edit '<sonar-installation-directory>/conf/' to configure host/port, context path, database based on your requirement.
Note : It is recommended to use other database like Oracle, MySQL, SQLServer etc for production environment. In this post, we have used default embedded database H2 for testing purpose only.


4. Browse Sonar Application

Browse to http://localhost:9000 for Sonar exploring administrative features. Use admin/admin as Login/Password to login to the application as administrator.

Sonar Admin Console