O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring PostgreSQL

The first thing we need to do is create a user and database that SonarQube can use. Just for the record, SonarQube can work with SQL Server, MySQL, and Oracle too, but PostgreSQL is always a good (and free) choice.

On Ubuntu, open the PostgreSQL terminal and run the script to create a sonar user and then the script to create a database, making the sonar user the owner:

sudo -u postgres psql\create user sonar with password 'sonar';\create database sonar with owner sonar encoding 'UTF8';\q

The UTF8 encoding is NOT optional, so be sure to include it. Also, don't forget the semicolons at the end of your statements.

On Windows, you can also create a user and database using the command prompt. It only differs from Ubuntu ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required