We're here to assist with any of your needs, don't hestitate to reach out.
SonarQube is an open-source platform that provides continuous inspection of your source code to detect bugs, vulnerabilities, and code smells in real-time. It helps to ensure that your code quality meets industry standards and improves overall software development efficiency.
Here are the steps to install SonarQube on CentOS 8:
sudo dnf update -y
sudo dnf install -y wget unzip java-11-openjdk
cd /opt
sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.1.1.47736.zip
sudo unzip sonarqube-9.1.1.47736.zip
sudo rm sonarqube-9.1.1.47736.zip
sudo vi /opt/sonarqube-9.1.1.47736/conf/sonar.properties
Update the following properties:
sonar.jdbc.username=sonarqube
sonar.jdbc.password=strongpassword
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
sudo dnf install -y postgresql-server
sudo systemctl enable --now postgresql
sudo -u postgres psql -c "create database sonarqube"
sudo -u postgres psql -c "create user sonarqube with encrypted password 'strongpassword'"
sudo -u postgres psql -c "grant all privileges on database sonarqube to sonarqube"
sudo /opt/sonarqube-9.1.1.47736/bin/linux-x86-64/sonar.sh start
http://localhost:9000
By default, SonarQube runs on port 9000. You can access it using your server's IP address or domain name.
sudo /opt/sonarqube-9.1.1.47736/bin/linux-x86-64/sonar.sh stop
That's it! You have successfully installed SonarQube on CentOS 8. Now, you can analyze your code by configuring SonarQube projects and executing code scans.
What our customers say about us
Create your free account today.