Loading...

How to install SonarQube on CentOS 7?

Simple.Predictable.Scalable

Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing SonarQube on CentOS 7

SonarQube is an open-source platform for continuous code quality inspection that helps to identify bugs, vulnerabilities, and maintainability issues in your codebase. By analyzing source code and providing detailed reports, SonarQube helps development teams improve code quality and maintain high standards.

Installation Steps

First, update your CentOS 7 system packages:

SonarQube requires Java to run. Install the JDK:

Download the latest version of SonarQube:

Create a new system unit file for SonarQube:

Create a new system user to run SonarQube:

Change the ownership of the SonarQube installation directory:

Start the SonarQube service and enable it to start on boot:

After starting the service, you can access the SonarQube web interface by navigating to http://your_server_ip_or_domain:9000 in your web browser. This will launch the SonarQube dashboard where you can configure projects and perform code analysis.

  1. Update System Packages
  2. sudo yum update -y
  3. Install Java Development Kit (JDK)
  4. sudo yum install java-1.8.0-openjdk-devel -y
  5. Download and Configure SonarQube
  6. wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.9.0.43852.zip

    Unzip the downloaded file:

    unzip sonarqube-8.9.0.43852.zip

    Move the extracted folder to the desired location:

    sudo mv sonarqube-8.9.0.43852 /opt/sonarqube
  7. Configure SonarQube as a Systemd Service
  8. sudo vi /etc/systemd/system/sonar.service

    Add the following configuration:

    [Unit]
    Description=SonarQube service
    After=syslog.target network.target

    [Service]
    Type=forking
    ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
    ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
    User=sonarqube
    Group=sonarqube
    Restart=always
    LimitNOFILE=131072
    LimitNPROC=8192

    [Install]
    WantedBy=multi-user.target

    Save and close the file.

  9. Create a SonarQube System User
  10. sudo useradd -r -s /bin/false sonarqube
  11. Set File Permissions
  12. sudo chown -R sonarqube:sonarqube /opt/sonarqube

    Ensure that other users cannot access the SonarQube installation directory:

    sudo chmod -R 775 /opt/sonarqube
  13. Start and Enable the SonarQube Service
  14. sudo systemctl start sonar
    sudo systemctl enable sonar
  15. Accessing SonarQube Web Interface

Congratulations! You have successfully installed SonarQube on CentOS 7. You can now start using SonarQube to analyze and improve your code quality.

Refer A Friend
Get $25

Installing SonarQube on CentOS 7
SonarQube installation guide
How to install SonarQube on CentOS 7
Step-by-step SonarQube installation on CentOS 7
CentOS 7 SonarQube setup
Installing SonarQube latest version on CentOS 7
SonarQube installation prerequisites
SonarQube configuration on CentOS 7
SonarQube setup on CentOS 7
SonarQube installation troubleshooting on CentOS 7

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.