5.1.1、yum安装mysql

  1. https://www.cnblogs.com/brianzhu/p/8575243.html
  2. wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
  3. yum -y install mysql57-community-release-el7-10.noarch.rpm
  4. yum -y install mysql-community-server
  5. systemctl start mysqld.service
  6. systemctl status mysqld.service
  7. grep "password" /var/log/mysqld.log
  8. mysql -uroot -p
  9. ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
  10. create database sonar;

5.1、安装sonar - 图1

5.1.1、安装sonar

  1. 下载sonar压缩包: https://www.sonarqube.org/downloads/
  2. yum install unzip
  3. unzip sonarqube-6.7.4.zip
  4. mkdir /ecapp/sonar
  5. mv sonarqube-6.7.4/* /ecapp/sonar
  6. useradd sonar 创建sonar用户,必须sonar用于启动,否则报错
  7. chown -R sonar:sonar /ecapp/sonar 更改sonar
  8. 修改sonar配置文件
  9. vi /ecapp/sonar/conf/sonar.properties
  10. 内容如下:
  11. #mysql用户名
  12. sonar.jdbc.username=root
  13. #mysql密码
  14. sonar.jdbc.password=Root@123
  15. #jdbc连接mysql
  16. sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
  17. 启动&停止
  18. cd /ecapp/sonar
  19. su sonar ./bin/linux-x86-64/sonar.sh start 启动
  20. su sonar ./bin/linux-x86-64/sonar.sh status 查看状态
  21. su sonar ./bin/linux-x86-64/sonar.sh stop 停止
  22. tail -f logs/sonar.log查看日志
  23. 访问sonar
  24. http://47.93.249.164:9000/
  25. 默认账户:admin/admin

5.1、安装sonar - 图2

5.1、安装sonar - 图3

  1. eboss_sonarqube: 9a00a5af1959e38e65e1836fefa3e7a110935311
  2. 记下来 后面会用

5.1.1、sonar汉化列表

  1. https://github.com/xuhuisheng/sonar-l10n-zh/releases/tag/sonar-l10n-zh-plugin-1.28
  2. https://codechina.csdn.net/mirrors/sonarqubecommunity/sonar-l10n-zh/-/tree/master

5.1、安装sonar - 图4

sonar-l10n-zh-plugin-1.19.jar

  1. 这里用的6.7sonar版本,所以汉化包用的为1.19,放到目录 ll /ecapp/sonar/extensions/plugins/下

5.1、安装sonar - 图5

5.1、安装sonar - 图6