Centos7安装部署SonarQube7.9.1教程
0.参考文档
LTS 7.9.1 新特性:https://www.sonarqube.org/sonarqube-7-9-lts/
JDK11 下载地址: 链接:https://pan.baidu.com/s/1VGEUd2nPzsDeOE2Ycrcmqg 密码:gpx9
1.下载软件包
下载链接: https://www.sonarqube.org/downloads/

2.添加系统用户
useradd sonarqube
passwd sonarqube
3.优化系统参数
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -u 4096 sonarqube
ulimit -n 65536 sonarqube
4.解压安装包
mv sonarqube-7.9.1.zip /home/sonarqube/
chown -R sonarqube:sonarqube /home/sonarqube/
su - sonarqube
yum -y install unzip
unzip sonarqube-7.9.1.zip
5.更改配置文件
vim sonarqube-7.9.1/conf/sonar.properties [sonarqube@localhost ~]$ grep -v "^#" sonarqube-7.9.1/conf/sonar.properties | grep -v "^$"
sonar.jdbc.username=sonarqube
sonar.jdbc.password=meiyoumima
sonar.jdbc.url=jdbc:postgresql://127.0.0.1/sonarqube?currentSchema=my_schema
6.安装PostgreSQL#下载pg9.6 源
yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96-server postgresql96-contrib
#初始化db
/usr/pgsql-9.6/bin/postgresql96-setup initdb #启动服务、开机自启
systemctl start postgresql-9.6
systemctl enable postgresql-9.6 #防火墙
firewall-cmd --add-service=postgresql --permanent
firewall-cmd --reload #登录数据库
su - postgres
psql -U postgres
ALTER USER postgres with encrypted password 'xxxxxx';
\q
exit #创建sonarqube用户
create user sonarqube with password 'xxxxx';
create database sonarqube owner sonarqube;
grant all on database sonarqube to sonarqube;
create schema my_schema; #开启远程访问
vi /var/lib/pgsql/9.6/data/postgresql.conf #listen_addresses = '*'
vi /var/lib/pgsql/9.6/data/pg_hba.conf systemctl restart postgresql-9.6.service #pg_hba.conf
# IPv4 local connections:
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
host all all 0.0.0.0/0 ident
7.添加系统服务
ln -s /home/sonarqube/sonarqube-7.9.1/bin/linux-x86-64/sonar.sh /usr/bin/sonar vim /etc/init.d/sonarqube #!/bin/sh
#
# rc file for SonarQube
#
# chkconfig: 345 96 10
# description: SonarQube system (www.sonarsource.org)
#
### BEGIN INIT INFO
# Provides: sonar
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: SonarQube system (www.sonarsource.org)
# Description: SonarQube system (www.sonarsource.org)
### END INIT INFO /usr/bin/sonar $* chkconfig --add sonarqube
chkconfig sonarqube on service sonarqube status
8.FAQ
1. JDK11错误: 需要安装JDK11
[sonarqube@localhost linux-x86-64]$ ./sonar.sh console
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 20:46:06.753 [WrapperSimpleAppMain] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'rewriteBatchedStatements=true'
jvm 1 | 20:46:06.764 [WrapperSimpleAppMain] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'useConfigs=maxPerformance'
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11+ to run
jvm 1 | java.lang.IllegalStateException: SonarQube requires Java 11+ to run
jvm 1 | at org.sonar.application.App.checkJavaVersion(App.java:93)
jvm 1 | at org.sonar.application.App.start(App.java:56)
jvm 1 | at org.sonar.application.App.main(App.java:98)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:748)
wrapper | <-- Wrapper Stopped
2.MySQL数据库不支持

Centos7安装部署SonarQube7.9.1教程的更多相关文章
- CentOS7安装部署zabbix3.4操作记录
CentOS7安装部署zabbix3.4操作记录 1.安装前准备 1.1 查看centos的系统版本 [root@zabbix ~]# cat /etc/redhat-release CentOS L ...
- centos7 安装部署运行 Redis5
原文:centos7 安装部署运行 Redis5 Redis5 下载与解压(官网: https://redis.io/download ) 下载命令:wget http://download.redi ...
- 容器centos7安装部署ansible
容器centos7安装部署ansible centos镜像版本及ansible版本 centos:centos7.5.1804 ansible:2.9.11 启动容器并进入容器 docker run ...
- Centos7安装部署搭建gitlab平台、汉化
Centos7安装部署搭建gitlab平台.汉化 安装环境要求:内存不要小于4G,否则后期web界面可能会报错 一.准备工作 1.1 查看系统版本 首先查询系统版本,下载Gitlab的对应版本 [ro ...
- 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】
VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...
- centos7安装部署opentsdb2.4.0
写在前面 安装HBase 在HBase中创建表结构 安装配置并启动opentsdb 写在前面 最近因为项目需要在读opentsdb的一部分源码,后面会做个小结分享出来.本人是不大喜欢写这种安装部署的文 ...
- centos7 安装部署 Jenkins
Jenkins 安装部署 1. 安装资源下载 Jenkin镜像地址: http://mirrors.jenkins-ci.org/status.html 选择清华大学镜像地址下载rpm https:/ ...
- centos7安装部署SVN
SVN介绍 SVN是个自由.开源的版本控制系统,绝大多数开源软件都使用SVN作为代码版本管理软件. SVN的官方网站http://subversion.apache.org/.目前SVN在开源社区 ...
- Centos7 安装部署Kubernetes(k8s)集群
目录 一.系统环境 二.前言 三.Kubernetes 3.1 概述 3.2 Kubernetes 组件 3.2.1 控制平面组件 3.2.2 Node组件 四.安装部署Kubernetes集群 4. ...
随机推荐
- [CSP-S模拟测试]:密码(AC自动机+DP)
题目传送门(内部题19) 输入格式 第一行两个正整数$n,k$,代表秘钥个数和要求.接下来两个正整数$x$和$y$,意义如题所述.接下来$n$行,每行一个正整数,意义如题所述. 输出格式 一个正整数, ...
- html&css面试笔记
1.CSS选择器有哪些?它们的优先级是怎样的? 选择器类型: id选择器 ( # myid) 类选择器 (.myclassname) 标签选择器 (div, h1, p) 相邻选择器 (h1 + p) ...
- vue项目在IE下显示空白打不开问题
近期遇到了项目是vue做的,在IE浏览器下打不开,显示空白问题,解决方案如下: 打不开的原因是因为少了babel-polyfill处理器,所以第一步需要下载: npm install babel-po ...
- Java基本数据类型内存分配
1.java程序运行时有6中地方存储数据,分别是:寄存器.栈.堆.静态存储.常量存储.非RAM(随机存储器),主要是堆与栈的存储. 2.堆与栈是java用来在RAM中存储数据的地方,java自动管 ...
- Flink水印机制(watermark)
Flink流处理时间方式 EventTime 时间发生的时间,例如:点击网站上的某个链接的时间 IngestionTime 某个Flink节点的source operator接收到数据的时间,例如:某 ...
- VB - 变量
Cbool函数将变量转换成布尔值: Cbyte函数将变量转换为0到255之间的整数. Ccur函数.Cdbl函数和Csng函数将变量转换为浮点数值,前者只精确到小数点后四位,后两者要更加精确,数值的范 ...
- Cocos2d-x之Sprite
| 版权声明:本文为博主原创文章,未经博主允许不得转载. Sprite是Cocos2d-x游戏开发者最常用的类,用图片把精灵(Sprite)显示在屏幕上. 在游戏开发中,经常会遇到精灵(Sprit ...
- k8s 组件介绍-API Server
API Server简介 k8s API Server提供了k8s各类资源对象(pod,RC,Service等)的增删改查及watch等HTTP Rest接口,是整个系统的数据总线和数据中心. kub ...
- 【Tensorflow】slim.arg_scope()的使用
https://blog.csdn.net/u013921430/article/details/80915696
- 2019牛客暑期多校训练营(第七场)E F H I
E Find the median 题意:每次往序列中增加连续的[l,r]的数,每加入一次就询问当前序列的中位数. 解法:此题没有要求在线,那么直接离线+线段树+二分就可以了.求出每个端点之后排序得到 ...