SonarQube is an open-source static testing analysis software, it is used by developers to manage source code quality and consistency.
Source: https://docs.sonarqube.org/latest/requirements/requirements/
- An EC2 instance with a minimum of 2 GB RAM (t2.small)
- Java 11 installation
amazon-linux-extras list amazon-linux-extras install java-openjdk11
- SonarQube cannot be run as root on Unix-based systems, so create a dedicated user account for SonarQube if necessary.
-
Download SonarQube latest verions on to EC2 instace
cd /opt wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-x.x.zip
-
extract packages
unzip /opt/sonarqube-x.x.zip
-
Change ownershipt to the user and Switch to Linux binaries directory to start service
chown -R <sonar_user>:<sonar_user_group> /opt/sonarqube-x.x cd /opt/sonarqube-x.x/bin/linux-x86-64 ./sonar.sh start
-
Connect to the SonarQube server through the browser. It uses port 9000.
Note
: Port should be opened in the Security grouphttp://<Public-IP>:9000
- Stop SonarQube server
cd /opt/sonarqube-x.x/bin/linux-x86-64 ./sonar.sh stop
- Terminate EC2 instance incase if you setup only for this lab.
People who want to setup SonarQube and would like to integrate with Jenkins
Thank you for your interest in contributing to our project. Whether it is a bug report, new feature, correction, or additional documentation or solutions, we greatly value feedback and contributions from our community. Start here