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. ...
随机推荐
- 8051 r0-r7 是什么
R0~R7表示当前选中的寄存器组的寄存器0~7,5I机有p0,p1,p2,p3口,每组有八个寄存器(R0-R7),比如MOV A Rn (n=0~7),表示把寄存器Rn 的内容送给累加器A,其中源操作 ...
- ALM11服务器IP变更相关配置修改
最近项目新增了网络控制,需要把ALM服务器迁移到新的区域.服务器整体复制后更改了IP地址. ALM与Oracle在同一台服务器(windows server 2008 R2) ALM的配置也需要做如下 ...
- Nuget-Doc:Nuget 简介
ylbtech-Nuget-Doc:Nuget 简介 1.返回顶部 1. NuGet 简介 2019/05/24 适用于任何现代开发平台的基本工具可充当一种机制,通过这种机制,开发人员可以创建.共享和 ...
- 建站手册-浏览器信息:Google Chrome 浏览器
ylbtech-建站手册-浏览器信息:Google Chrome 浏览器 1.返回顶部 1. http://www.w3school.com.cn/browsers/browsers_chrome.a ...
- pod 查看当前源/添加源
1 pod 查看当前源 PeiSongs-iMac:5i5jAPP chenpeisong$ pod repo 0 repos 2 pod repo换源 CocoaPods 镜像使用帮助CocoaPo ...
- [心得]編寫Linux kernel modules時惱人的Makefile
在一台機器上寫好這樣的Makefile用以編譯modules obj-m:=hello.o CURRENT_PATH:=$(shell pwd) VERSION_NUM:=$(shell uname ...
- linux缺頁異常處理--內核空間[v3.10]
缺頁異常被觸發通常有兩種情況—— 1.程序設計的不當導致訪問了非法的地址 2.訪問的地址是合法的,但是該地址還未分配物理頁框 下面解釋一下第二種情況,這是虛擬內存管理的一個特性.盡管每個進程獨立擁有3 ...
- LOJ6682 梦中的数论
题目 不难发现我们要求的东西是\(\sum_{i=1}^n\binom{\sigma(i)}{2}=\sum_{i=1}^n\frac{\sigma(i)(\sigma(i)-1)}{2}=\frac ...
- 基于SSL实现MySQL的加密主从复制
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u012974916/article/details/53316758 大家都知道MySQL的主从复制 ...
- Django Rest框架 APIView源码调用
上一篇说了请求访问的流程,这一篇说一下请求对应的源码调用 as_view 定义view dispatch dispatch initialize_request get_parsers ...