Install SonarQube code scanning tool on CentOS

Install SonarQube code scanning tool on CentOS

One, install JDK

1. JDK is the operating environment of SonarQube. From the documentation, Documentation | SonarQube Docs https://docs.sonarqube.org/7.9/, you can see that you need Java11 or higher.
2. After downloading Java11 from Oracle's official website , upload it to Server
3. Run commands on the server

rpm -ivh 文件名.rpm
  1. Use the following command to verify the successful installation of the Java environment
    Insert picture description here

Second, install SonarQube

  1. Download on SonarQube official website at: https://www.sonarqube.org/
  2. After local decompression, upload the folder to the server
  3. New sonar user
useradd sonar
  1. Recursively empower the SonarQube program folder
chmod 777 SonarQube文件夹名称 -R
chgrp 777 SonarQube文件夹名称 -R
  1. Enter the directory /sonarqube-8.6.1.40680/bin/linux-x86-64
  2. Switch to the sonar user and run the sonar.sh file in the directory
  3. Open port 9000
firewall-cmd --zone=public --add-port=9000/tcp --permanent   # 开放9000端口
  1. Use a browser to access SonarQube, IP address: 9000, login account and password are both admin, you need to modify the initial password after logging in

Guess you like

Origin blog.csdn.net/zhuan_long/article/details/113523729