In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install SonarQube on the Linux system. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
SonarQube is a project engineering code quality testing artifact, the use of SonarQube can help you find code vulnerabilities, Bug, odors and other information.
About SonarQube: SonarQube is an open source tool for code quality management, which is mainly used to manage the quality of source code. Through the plug-in form, you can support many computer languages, such as java, client, go,C/C++, PL/SQL, Cobol, JavaScrip, Groovy and so on. Sonar can use PMD,CheckStyle,Findbugs and other code rule detection tools to detect your code to help you find vulnerabilities, Bug, odors and other information.
SonarQube installation 1, environment preparation (1) sonarQube download address https://www.sonarqube.org/downloads/
Note: the official website shows that the latest version is 6.2, but I can't download it, so I have no choice but to choose 5.6.4.
(2) sonarQube Scanners download address http://docs.sonarqube.org/display/SCAN/Analyzing+Source+Code
(2) jdk1.8 (Note: according to the information on the official website, you need to use jdk1.8. If your environment is already configured with JAVA_HOME, it doesn't matter. We can manually specify the running jdk of sonar as 1.8 (described later in the configuration).
(4) install mysql, which can be a remote connection (Note: mysql version needs to be 5.6 +)
2. SonarQube installation (1) specify jdk1.8 (ignore this step if the system environment variable is already 1.8)
After downloading sonarQube, decompress and open the conf directory and modify wrapper.conf
(2) start sonar
[root@fastdfs1 sonarqube-5.6.4] #. / bin/linux-x86-64/sonar.sh start (3) observe the startup log
[root@fastdfs1 sonarqube-5.6.4] # tail-200f. / logs/sonar.log (4) visit http:// your IP:9000/sonar is successful when you see the welcome screen
3. SonarQube configuration (1) mysql add sonar users
Mysql > CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; mysql > CREATE USER 'sonar' IDENTIFIED BY' sonar'; mysql > GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY' sonar'; mysql > GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY' sonar'; mysql > FLUSH PRIVILEGES; (2) sonarQube configure mysql, modify / conf/sonar.properties
Sonar.jdbc.username=test sonar.jdbc.password=1234 sonar.jdbc.url=jdbc:mysql:// database IP:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance sonar.web.host= your local IP sonar.web.context=/sonar sonar.web.port=9000
(4) restart the service and observe the log
4. SonarQube Sinicization (1) install the Chinese plug-in as follows
(2) the success of Sinicization can be found by restarting and revisiting.
Simple use the default user name is admin password admin
(1) configure sonar-scanner (modify / sonar-scanner-2.8/conf/sonar-scanner.properties if SonarQube and Sonar-scanner are not on the same server)
Sonar.host.url= http://sonarQubeIP:9000 sonar.jdbc.username=test sonar.jdbc.password=1234 sonar.jdbc.url=jdbc:mysql:// Database IP:3306/sonar?useUnicode=true&characterEncoding=utf8 (2) sonar-scanner specifies jdk1.8
Modify / sonar-scanner-2.8/bin/sonar-runner
This is the end of the article on "how to install SonarQube in Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.