On this page

SonarQube is an open source platform to continuously inspect code quality of applications. It is written in Java language and supports multiple databases. You can inspect code and check the health of an application for more than 20 programming languages including Java, C, C++, C#, PHP, and web languages like JavaScript, HTML and CSS. SonarQube can analyze source code, find security vulnerabilities, detect bugs and show the result on web-based dashboard. You can easily integrate SonarQube with Maven, Ant, Gradle, MSBuild, LDAP, Active Directory and GitHub.

In this tutorial, we will learn how to install SonarQube on an Ubuntu 18.04 LTS (Bionic Beaver) server.

Requirements

A server running Ubuntu 18.04.

A non-root user with sudo privileges.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

sudo apt-get update -ysudo apt-get upgrade -y

Once your system is updated, restart the system to apply the changes.

Install Java

SonarQube is written in Java language, so you will need to install Java to your system. First, add the Java repository with the following command:

sudo add-apt-repository ppa:webupd8team/java

Next, update the repository and install Java with the following command:

sudo apt-get update -ysudo apt-get install oracle-java8-installer -y

Once the Java is installed, check the Java version using the following command: