Would you like to learn how to do a Sonarqube installation on Ubuntu Linux? In this tutorial, we are going to show you how to install Sonarqube on a computer running Ubuntu Linux.

• Ubuntu version: 18
• Ubuntu version: 19
• Sonarqube version: 7.9.1

Hardware List:

The following section presents the list of equipment used to create this Sonarqube tutorial.

Every piece of hardware listed above can be found at Amazon website.

Sonarqube Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Sonarqube installation.

Tutorial Sonarqube – Installation on Ubuntu Linux

Use apt-get to install the required packages.

Copy to Clipboard

Install the PostgreSQL database service.

Copy to Clipboard

Access the Postgres database service command-line.

Copy to Clipboard

Create a Postgres user named sonarqube.

Create a Postgres database named sonarqube.

Give the PostgreSQL user named sonarqube permission over the database named sonarqube .

Copy to Clipboard

Download the Sonarqube package and move it to the OPT directory.

Copy to Clipboard

Create a new Linux account named sonarqube.

Set the correct file permission on the sonarqube directory.

Copy to Clipboard

Edit the sonar.sh configuration file.

Copy to Clipboard

Configure the following options:

Copy to Clipboard

Edit the sonar.properties configuration file.

Copy to Clipboard

Configure the following options:

Copy to Clipboard

Create a Linux configuration file named 99-sonarqube.conf.

Copy to Clipboard

Here  is the content of the 99-sonarqube.conf file.

Copy to Clipboard

Edit the sysctl.conf configuration file.

Copy to Clipboard

Add the following lines at the end of the sysctl.conf file.

Copy to Clipboard

Reboot your computer to enable the new configuration

Copy to Clipboard

Start the Sonarqube service.

Copy to Clipboard

Use the following command to monitor the SonarQube log.

Copy to Clipboard

The Sonarqube log should show the following information:

Copy to Clipboard

Congratulations! You have finished the Sonarqube installation.

Sonarqube Installation – How to acess the Web interface

Open your browser and enter the IP address of your web server plus :9000

In our example, the following URL was entered in the Browser:

• http://192.168.15.10:9000

sonarqube dashboard

Click on the Login button and use the Sonarqube default username and password.

• Default Username: admin
• Default Password: admin

sonarqube login

Congratulations! You have finished the SonarQube installation.