sonar mysql 5.5_SonarQube5.4 Mysql5.7 Linux6.7管理平台的配置

1.下载依赖包:

yum -y install gcc-c ncurses-devel cmake make perl gcc

autoconf automake zlib libxml libgcrypt libtool

bison

2.替换mysql源

yum list installed | grep mysql

yum -y remove mysql-libs.x86_64

wget

dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

yum localinstall

mysql-community-release-el6-5.noarch.rpm

yum repolist all | grep mysql

yum -y install yum-utils libyaml-devel

3.剔除mysql5.5,mysql5.6源

yum-config-manager --disable mysql55-community

yum-config-manager --disable mysql56-community

yum-config-manager --enable mysql57-community-dmr

yum repolist enabled | grep mysql

4.下载安装mysql5.7并开启服务

yum install mysql-community-server

chkconfig mysql on

chkconfig mysqld on

更改mysql配置文件

vim /etc/my.cnf

innodb_buffer_pool_size = 1024M  #缓存innodb表的索引

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

default-storage-engine=INNODB #将默认引擎设置为INNODB

query_cache_type=1 #开启mysql 查询缓存

query_cache_size=128M

5.查看mysql随机password

grep "password" /var/log/mysqld.log

6.创建sonarqube的数据库

mysql -uroot -p

mysql> create database sonarqube character set

utf8 collate utf8_bin;

mysql> grant all privileges on sonarqube.* to

sonarqube@localhost identified

by '';

mysql>show engines;

mysql>show variables like

'%storage_engine%';

mysql>show variables like

'%query_cache%';

mysql> quit;

7.解压缩文件,创建目录

unzip sonarqube-5.4

mv sonarqube-5.4 /sonarqube/

8.修改配置文件

vim /sonarqube/conf/sonar.properties

sonar.jdbc.username=sonarqube #数据库账号

sonar.jdbc.password=password #数据库密码

#----- Embedded Database (default)

# H2 embedded database server listening port, defaults to

9092

#sonar.embeddedDatabase.port=9092

#----- MySQL 5.x

# Only InnoDB storage engine is supported (not myISAM).

# Only the bundled driver is supported. It can not be

changed.

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance #数据库位置

sonar.web.host=0.0.0.0

sonar.web.port=9000 #端口

/sonarqube/bin/linux-x86-64/sonar.sh

start #启动服务

9.查看数据库检查服务是否安装成功

mysql -uroot -p

mysql> use sonarqube;

mysql> show tables;

mysql> show columns from widgets;

10.下载中文包到plugins下

mv sonar-l10n-zh-plugin-1.9.jar /sonarqube/extensions/plugins/

11.重启服务

/sonarqube/bin/linux-x86-64/sonar.sh

restart

a4c26d1e5885305701be709a3d33442f.png

账号:admin

密码:admin

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值