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. ...
随机推荐
- 前端每日实战:19# 视频演示如何用纯 CSS 创作一种有削铁如泥感觉的菜单导航特效
效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/XqYroe 可交互视频教程 此视频 ...
- Android实战技巧:Dialog (转)
转:http://blog.csdn.net/hitlion2008/article/details/7567549#t0 Dialog是任何系统都必须有的一个控件,作为辅助窗口,用于显示一些消息,或 ...
- 两个图层一上一下div view
<view class="main"> <view class="user-info"> </view> <view ...
- codeforces 557E Ann and Half-Palindrome
题意简述 给定一个字符串(长度不超过5000 且只包含a.b)求满足如下所示的半回文子串中字典序第k大的子串 ti = t|t| - i + 1(|t|为字符串长度) -------------- ...
- MySQL-初始化和自动更新TIMESTAMP和DATETIME
https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html 例,添加自动更新的保存最后一次修改该条记录的时间戳的字段: ...
- CentOS7 防火墙Firewall常用命令
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
- 在虚拟机的Linux系统下安装wineqq
| 版权声明:本文为博主原创文章,未经博主允许不得转载. 本文参考教程:http://www.ubuntukylin.com/ukylin/forum.php?mod=viewthread& ...
- 电脑同时安装python2和python3 ,默认使用python3
python3环境变量放在python2前面: 此电脑--属性--高级系统设置--高级--环境变量--系统变量--Path--编辑 D:\Python36\Scripts;D:\Python36;C: ...
- vue项目中路由验证和相应拦截的使用
详解Vue路由钩子及应用场景(小结):https://www.jb51.net/article/127678.htm vue项目中路由验证和相应拦截的使用:https://blog.csdn.net/ ...
- 彻底干掉恶心的 SQL 注入漏洞, 一网打尽!
来源:b1ngz.github.io/java-sql-injection-note/ 简介 文章主要内容包括: , name); 还有一些情况,比如 order by.column name,不能使 ...