Member-only story
How to install Sonarqube on AWS EC2
2 min readMar 1, 2019
First step: After login in the Ec2 instance, we have to update the java to version 8. (See requirements of Sonarqube)
$ sudo yum install java-1.8.0
Let’s test it if the current Java version is 8.
$ java -versionopenjdk version “1.8.0_191”
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Second step: In the second step we install Sonarqube and start it. Note: Sonarqube uses Elasticsearch, and it is forbidden to run Elasticsearch on root privilege we have to add a new group etc.
$ wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.6.zip$ sudo unzip sonarqube-7.6.zip -d /opt/sonar76$ groupadd sonar$ useradd -c "Sonar System User" -d /opt/sonar76 -g sonar -s /bin/bash sonar$ chown -R sonar:sonar /opt/sonar76$ cd opt/sonar76/sonarqube-7.6/bin/linux-x86-64/$ sudo ./sonar.sh start
Third step: We can open Sonarqube in the browser.
http://<ipaddress>:9000
Sources: