How to Install PostgreSQL for SonarQube on Ubuntu 16.04

In this tutorial, we will be installing and configuring SonarQube on an Alibaba Cloud Elastic Compute Service (ECS) instance with Ubuntu 16.04.

Update Your Ubuntu System

Before proceeding with installation of any kind of package, use the following command to update your Ubuntu system. To execute this command, remember to login from non-root user with sudo privileges.

# sudo apt update && sudo apt upgrade

Install PostgreSQL

SonarQube supports PostgreSQL, MySQL, MSSQL and Oracle. In this tutorial, I will use PostgreSQL as MySQL is not recommended for large instances. For using MySQL, you can only use bundled mysql-connector-java. InnoDB engine is a must in MySQL. To avoid such restrictions, I strongly recommend using PostgreSQL. Follow the steps below to install PostgreSQL.

# sudo sh -c 'echo "deb `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
# wget -q -O - | sudo apt-key add -
# sudo apt-get -y install postgresql postgresql-contrib
# sudo systemctl start postgresql
# sudo systemctl enable postgresql

Related Blog Posts

Setting up a PostgreSQL database on an Ubuntu instance

Related Market Product

Postgres Pro Standard Database 10 (Ubuntu 16)

Related Documentation

Migrate data from PostgreSQL to AnalyticDB for PostgreSQL

Related Products

ApsaraDB RDS for PostgreSQL

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store