In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1. System environment:
RedHat6.4 (JDK1.8+MySQL5.7.12+SonarQube7.4), win10 (SonarScanner4.2)
Install and configure MySQL
1. download
Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
two。 Installation
Check the server to see if MySQL is installed before installation, and uninstall it if so:
[root@otms_mq04 ~] # rpm-qa | grep mysql
Mysql-libs-5.1.71-1.el6.x86_64
[root@otms_mq04] # rpm-e-- nodeps mysql-libs-5.1.66-2.el6_3.x86_64
Extract the downloaded file:
[root@otms_mq04] # tar-xf mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
[otms@otms_mq04 software] $ll
Total 960712
-rw-r--r-- 1 otms otms 457492480 Dec 2 11:17 mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
-rw-r--r-- 1 otms otms 23672176 Mar 29 2016 mysql-community-client-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 334040 Mar 29 2016 mysql-community-common-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 3765324 Mar 29 2016 mysql-community-devel-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 38736700 Mar 29 2016 mysql-community-embedded-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 133956388 Mar 29 2016 mysql-community-embedded-devel-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 2174152 Mar 29 2016 mysql-community-libs-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 1720844 Mar 29 2016 mysql-community-libs-compat-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 149101172 Mar 29 2016 mysql-community-server-5.7.12-1.el6.x86_64.rpm
-rw-r--r-- 1 otms otms 104017276 Mar 29 2016 mysql-community-test-5.7.12-1.el6.x86_64.rpm
Install sequentially:
Rpm-ivh mysql-community-common-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-libs-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-devel-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-client-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-server-5.7.12-1.el6.x86_64.rpm
Not surprisingly, MySQL should have been successfully installed.
3. Environment variable configuration
1) start MySQL:service mysqld start
(the picture is originated from the Internet, which is infringed and deleted)
2) Log in: mysql-u root-p. The initial login password is empty, and enter directly:
The reason for this error is that there is no Password field in the mysql.user table in MySQL5.7, so log in securely, and then change the password.
The solution is as follows:
Modify the MySQL configuration file: vim / etc/my.cnf, add: skip-grant-tables at the end of the file, restart the MySQL service: service mysqld restart after saving, and log in again.
3) modify the password. The user's password is under the database named mysql:
Execute the following instructions in turn:
Mysql > use mysql
Mysql > update user set password_expired='N' where user='root'
Mysql > update user set authentication_string=password ('root') where user='root'
Mysql > flush privileges
4) Note: be sure to remove the skip password detection content added before the my.cnf configuration file, and restart the service
5) create the database and authorize it (prepare for the following SonarQube)
The MySQL configuration is complete.
Install and configure SonarQube
1. download
Https://www.sonarqube.org/downloads/
two。 Modify environment variabl
[root@otms_mq04 ~] # vim / etc/profile
Export SONAR_HOME=/home/sonarqube-7.4
[root@otms_mq04 ~] # source / etc/profile
3. Modify the configuration file
.. / sonarqube-7.4/conf/sonar.properties
Add the following configuration:
Sonar.jdbc.username=Sonar
Sonar.jdbc.password=Sonar
Sonar.jdbc.url=jdbc:mysql://ip:3306/Sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
Sonar.web.host=0.0.0.0
Sonar.web.port=9000
After the configuration is completed, you can start the startup file:
.. / sonarqube-7.4/bin/linux-x86-64/sonar.sh
After the startup is completed, the following information is displayed to prove the success of the startup.
Access link: http://localhost:9000/, default username password: admin/admin
4. Chinese plug-in address (note that the installation version corresponds to sonar):
Https://github.com/SonarQubeCommunity/sonar-l10n-zh/releases/tag/sonar-l10n-zh-plugin-1.24
Install and configure SonarScanner
1. Download:
Https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
two。 Modify environment variabl
Environment variable → system variable → Path → New → scanner path (C:\ Software\ sonar-scanner-cli-4.2.0.1873-windows\ sonar-scanner-4.2.0.1873-windows\ bin) → save exit
3. Modify the configuration file
C:\ Software\ sonar-scanner-cli-4.2.0.1873-windows\ sonar-scanner-4.2.0.1873-windows\ conf\ sonar-scanner.properties
# Configure here general information about the environment, such as SonarQube server connection details for example
# No information about specific project should appear here
#-Default SonarQube server
# sonar.host.url= http://localhost:9000
#-Default source code encoding
# sonar.sourceEncoding=UTF-8
4. Add the sonar-project.properties file under the root directory of the project to be analyzed
Contents of the file:
Sonar.projectKey=OTMS_UDA_AUTOMATION_TEST
Sonar.jdbc.url=jdbc:mysql://ip:3306/Sonar?useUnicode=true&characterEncoding=utf8
Sonar.jdbc.username=Sonar
Sonar.jdbc.password=Sonar
Sonar.login=admin
Sonar.password=admin
# sonar.projectName=My project
# sonar.projectVersion=1.0
# sonar.sources=.
Sonar.sourceEncoding=UTF-8
5. Start the SonarScanner analysis code (here the command takes the analysis Python code as an example)
Sonar-scanner.bat-Dsonar.projectKey=OTMS_UDA_AUTOMATION_TEST-Dsonar.sources=C:\ workspace\ OTMS_UDA_AUTOMATION_TEST-Dsonar.host.url= http://ip:9000-Dsonar.login=admin-Dsonar.password=admin
Done.
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.