首页
常用命令
About Me
推荐
weibo
github
Search
1
Graylog收集文件日志实例
16,950 阅读
2
linuxea:jenkins+pipeline+gitlab+ansible快速安装配置(1)
16,434 阅读
3
git+jenkins发布和回滚示例
16,253 阅读
4
linuxea:如何复现查看docker run参数命令
15,582 阅读
5
OpenVPN吊销用户和增加用户(3)
14,751 阅读
ops
Openvpn
Sys Basics
rsync
Mail
NFS
Other
Network
HeartBeat
server 08
Code
Awk
Shell
Python
Golang
virtualization
KVM
Docker
openstack
Xen
kubernetes
kubernetes-cni
Data
Mariadb
PostgreSQL
MongoDB
Redis
MQ
Ceph
TimescaleDB
kafka
surveillance system
zabbix
ELK Stack
Open-Falcon
Prometheus
Web
apache
Tomcat
Nginx
自动化
Puppet
Ansible
saltstack
Proxy
HAproxy
Lvs
varnish
更多
音乐
影视
music
Internet Consulting
最后的净土
软件交付
持续集成
gitops
devops
登录
Search
标签搜索
kubernetes
docker
zabbix
Golang
mariadb
持续集成工具
白话容器
nginx
elk
linux基础
dockerfile
Gitlab-ci/cd
基础命令
最后的净土
docker-compose
saltstack
haproxy
jenkins
GitLab
prometheus
marksugar
累计撰写
645
篇文章
累计收到
140
条评论
首页
栏目
ops
Openvpn
Sys Basics
rsync
Mail
NFS
Other
Network
HeartBeat
server 08
Code
Awk
Shell
Python
Golang
virtualization
KVM
Docker
openstack
Xen
kubernetes
kubernetes-cni
Data
Mariadb
PostgreSQL
MongoDB
Redis
MQ
Ceph
TimescaleDB
kafka
surveillance system
zabbix
ELK Stack
Open-Falcon
Prometheus
Web
apache
Tomcat
Nginx
自动化
Puppet
Ansible
saltstack
Proxy
HAproxy
Lvs
varnish
更多
音乐
影视
music
Internet Consulting
最后的净土
软件交付
持续集成
gitops
devops
页面
常用命令
About Me
推荐
weibo
github
搜索到
1
篇与
sonarqube
的结果
2017-09-23
linuxea:sonarqube-6.5_2代码质量管理系统配置和汉化
SonarQube简介SonarQube是一个用于代码质量管理的开源平台,用于管理Java源代码的质量。通过插件机制,SonarQube可以集成不同的测试工具,代码分析工具,以及持续集成工具,比如pmd-cpd、checkstyle、findbugs、Jenkins。通过不同的插件对这些结果进行再加工处理,通过量化的方式度量代码质量的变化,从而可以方便地对不同规模和种类的工程进行代码质量管理。同时 SonarQube还对大量的持续集成工具提供了接口支持,可以很方便地在持续集成中使用 SonarQube。此外,SonarQube的插件还可以对 Java 以外的其他编程语言提供支持,对国际化以及报告文档化也有良好的支持参考:https://docs.sonarqube.org/display/SONAR/Documentation/为什么要使用6.5在pipeline的集成中需要6版本的支持Pause pipeline until quality gate is computedThe waitForQualityGate step will pause the pipeline until SonarQube analysis is completed and returns quality gate status.Pre-requisites:SonarQube server 6.2+ (need webhook feature)Configure a webhook in your SonarQube server pointing to <your Jenkins instance>/sonarqube-webhook/ (info) The trailing slash is mandatory with SonarQube 6.2 and 6.3!Use withSonarQubeEnv step in your pipeline (so that SonarQube taskId is correctly attached to the pipeline context).参考:https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins恰巧有人已经发布过,借鉴:https://testerhome.com/topics/10064安装数据库,这里需要5.6的数据库,之前没有,这里需要安装最新的install mariadb[root@linuxea.com-Node114 ~]# axel -n 50 http://mirror.poliwangi.ac.id/mariadb//mariadb-10.2.8/bintar-linux-x86_64/mariadb-10.2.8-linux-x86_64.tar.gz [root@linuxea.com-Node114 ~]# tar xf mariadb-10.2.8-linux-x86_64.tar.gz -C /usr/local [root@linuxea.com-Node114 ~]# useradd mysql -s /sbin/nologin -M [root@linuxea.com-Node114 ~]# cd /usr/local [root@linuxea.com-Node114 /usr/local]# ln -s mariadb-10.2.8-linux-x86_64 mysql && cd mysql [root@linuxea.com-Node114 /usr/local/mysql ]# mkdir /data/mysql -p [root@linuxea.com-Node114 /usr/local/mysql ]# chown mysql.mysql /data/mysql [root@linuxea.com-Node114 /usr/local]# ./mysql/scripts/mysql_install_db --datadir=/data/mysql --basedir=/usr/local/mysql --user=mysql Installing MariaDB/MySQL system tables in '/data/mysql' ... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! To do so, start the server, then issue the following commands: '/usr/local/mysql/bin/mysqladmin' -u root password 'new-password' '/usr/local/mysql/bin/mysqladmin' -u root -h linuxea.com-Node114.cluster.com password 'new-password' Alternatively you can run: '/usr/local/mysql/bin/mysql_secure_installation' which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the MariaDB Knowledgebase at http://mariadb.com/kb or the MySQL manual for more instructions. You can start the MariaDB daemon with: cd '/usr/local/mysql' ; /usr/local/mysql/bin/mysqld_safe --datadir='/data/mysql' You can test the MariaDB daemon with mysql-test-run.pl cd '/usr/local/mysql/mysql-test' ; perl mysql-test-run.pl Please report any problems at http://mariadb.org/jira The latest information about MariaDB is available at http://mariadb.org/. You can find additional information about the MySQL part at: http://dev.mysql.com Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved/配置:[root@linuxea.com-Node114 /usr/local]# cp mysql/support-files/mysql.server /etc/init.d/mysqld [root@linuxea.com-Node114 /usr/local]# chmod +x /etc/init.d/mysqld [root@linuxea.com-Node114 /usr/local]# cp mysql/support-files/my-large.cnf /etc/my.cnf cp:是否覆盖"/etc/my.cnf"? y [root@linuxea.com-Node114 /usr/local]# vim /etc/my.cnf添加:[mysqld] datadir=/data/mysql basedir=/usr/local/mysql query_cache_siz=16M启动和授权[root@linuxea.com-Node114 /usr/local]# /etc/init.d/mysqld start Reloading systemd: [ 确定 ] Starting mysqld (via systemctl): [ 确定 ] [root@linuxea.com-Node114 /usr/local]# ln -s /usr/local/mariadb-10.2.8-linux-x86_64/bin/mysql /usr/bin/mysql [root@linuxea.com-Node114 /usr/local]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 10.2.8-MariaDB-log MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; Query OK, 1 row affected (0.05 sec) MariaDB [(none)]> CREATE USER 'sonar' IDENTIFIED BY 'sonar'; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> GRANT ALL ON sonar.* TO 'sonar'@'10.10.0.98' IDENTIFIED BY 'sonar'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> install sonarqube-6.5_2下载地址https://www.sonarqube.org/downloads/[root@linuxea.com-Node113 ~]# unzip sonarqube-6.5_2.zip [root@linuxea.com-Node113 ~]# mv sonarqube-6.5 /usr/local/sonarqube [root@linuxea.com-Node113 ~]# cd /usr/local/sonarqube修改配置文件sed -i 's/#sonar.jdbc.username=/sonar.jdbc.username=sonar/g' /usr/local/sonarqube/conf/sonar.properties sed -i 's/#sonar.jdbc.password=/sonar.jdbc.password=sonar/g' /usr/local/sonarqube/conf/sonar.properties echo 'sonar.jdbc.url=jdbc:mysql://127.0.0.1:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance' >> /usr/local/sonarqube/conf/sonar.properties sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance最终如下:[root@linuxea.com-Node114 /usr/local/sonarqube]# egrep -v "^#|^$" conf/sonar.properties sonar.jdbc.username=sonar sonar.jdbc.password=sonar sonar.web.host=0.0.0.0 sonar.web.port=888 sonar.web.context=/sonar sonar.embeddedDatabase.port=9092 sonar.jdbc.url=jdbc:mysql://127.0.0.1:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false启动测试[root@linuxea.com-Node113 /usr/local/sonarqube]# ./bin/linux-x86-64/sonar.sh start Starting SonarQube... Started SonarQube. [root@linuxea.com-Node113 /usr/local/sonarqube]# 启动脚本[root@linuxea.com-Node114 /usr/local/sonarqube]# ln -s /usr/local/sonarqube/bin/linux-x86-64/sonar.sh /etc/init.d/sonar [root@linuxea.com-Node114 /usr/local/sonarqube]# chmod +x /etc/init.d/sonar [root@linuxea.com-Node114 /usr/local/sonarqube]# /etc/init.d/sonar start Starting SonarQube... SonarQube is already running. [root@linuxea.com-Node114 /usr/local/sonarqube]# /etc/init.d/sonar restart Stopping SonarQube... Stopped SonarQube. Starting SonarQube... Started SonarQube. [root@linuxea.com-Node114 /usr/local/sonarqube]# 汉化下载jar包到/usr/local/sonarqube/extensions/plugins下重启即可[root@linuxea.com-Node114 /usr/local/sonarqube/extensions/plugins]# wget https://github.com/SonarQubeCommunity/sonar-l10n-zh/releases/download/sonar-l10n-zh-plugin-1.17/sonar-l10n-zh-plugin-1.17.jar [root@linuxea.com-Node114 /usr/local/sonarqube/extensions/plugins]# /etc/init.d/sonar restart Stopping SonarQube... Stopped SonarQube. Starting SonarQube... Started SonarQube.再看已经汉化成功
2017年09月23日
3,687 阅读
0 评论
0 点赞