CentOS7 SonarQube安装
CentOS7 SonarQube安装
CentOS7 SonarQube安装
Download
Database
设定Postgres数据库
su postgres
psql -U postgres
CREATE USER sonar WITH PASSWORD 'sonar';
CREATE DATABASE sonar WITH OWNER sonar ENCODING 'UTF8';
\q
Install
- 安装
上传ZIP文件到/tmp目录下
mkdir /opt/sonar
cd /opt/sonar
unzip /tmp/sonarqube-5.0.zip
unzip /tmp/sonar-runner-dist-2.4.zip
环境变量
在/etc/profile.d目录下新建sonar.sh
#!/bin/bash
SONAR_HOME=/opt/sonar/sonarqube-5.0
SONAR_RUNNER_HOME=/opt/sonar/sonar-runner-2.4
PATH=$SONAR_RUNNER_HOME/bin:$PATH
export SONAR_HOME
export SONAR_RUNNER_HOME
export PATH
并赋予执行权限
chmod +x /etc/profile.d/sonar.sh
source /etc/profile.d/sonar.sh
/opt/sonar/sonarqube-5.0/conf/sonar.properties sonar.jdbc.username=sonar sonar.jdbc.password=sonar sonar.jdbc.url=jdbc:postgresql://localhost/sonar sonar.web.context= sonar.web.port=9084 sonar.search.port=9085
/opt/sonar/sonar-runner-2.4/conf/sonar-runner.properties #Configure here general information about the environment, such as SonarQube DB details for example #No information about specific project should appear here
#----- Default SonarQube server
sonar.host.url=http://localhost:9084 #----- PostgreSQL
sonar.jdbc.url=jdbc:postgresql://localhost/sonar #----- MySQL
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 #----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE #----- Microsoft SQLServer
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor #----- Global database settings
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar #----- Default source code encoding
sonar.sourceEncoding=UTF-8 #----- Security (when 'sonar.forceAuthentication' is set to 'true')
sonar.login=admin
sonar.password=admin
新建/etc/init.d/sonar
#!/bin/sh # chkconfig: - 80 20
# Description: SONAR /opt/sonar/sonarqube-5.0/bin/linux-x86-64/sonar.sh $*
exit $?
赋予执行权限
chmod +x /etc/init.d/sonar
设定开机启动
chkconfig sonar on
- 防火墙
新建文件/usr/lib/firewalld/services/sonar.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Sonar Qube 5.0 service</short>
<description>SonarQube</description>
<portprotocol="tcp"port="9084"/>
</service>
修改防火墙设定
firewall-cmd --permanent --add-service=sonar
firewall-cmd --reload
CentOS7 SonarQube安装的更多相关文章
- 代码审查工具Sonarqube安装
前言:在项目开发当中,完成需求并上线是一件很开心的事情,但为了能按时上线功能不得不为了完成功能而写代码,写的时候觉得先把功能上了以后再回头优化此处代码,但真正上线之后你就会发现你再也不想去修改之前遗留 ...
- 在centos7上安装Jenkins
在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...
- CentOS7 Jenkins安装
CentOS7 Jenkins安装 CentOS7 Jenkins安装 Download 从Jenkins下载apache-tomcat-8.0.18.tar.gz Install 安装 上传RPM文 ...
- 在 CentOS7 上安装 zookeeper-3.4.9 服务
在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/service ...
- 在 CentOS7 上安装 MongoDB
在 CentOS7 上安装 MongoDB 1 通过 SecureCRT 连接至 CentOS7 服务器: 2 进入到 /usr/local/ 目录: cd /usr/local 3 在当前目录下创建 ...
- 在 CentOS7 上安装 MySQL5.7
在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建 ...
- 在 CentOS7 上安装 Tomcat9
在 CentOS7 上安装 Tomcat9 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目 ...
- 在CentOS7上安装JDK1.8
在CentOS7上安装JDK1.8 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目录 to ...
- centos7.0 安装字体库
最近在centos7.0下用itextpdf将word文档转成pdf时出现字体丢失的情况.网上找了很多资料,各式各样的原因和解决方法.后来经过一番测试发现是centos7.0 minimal没有安装相 ...
随机推荐
- linux系统用户以及用户组管理
本系列的博客来自于:http://www.92csz.com/study/linux/ 在此,感谢原作者提供的入门知识 这个系列的博客的目的在于将比较常用的liunx命令从作者的文章中摘录下来,供自己 ...
- 关于公司内部的Nuget服务
简介 公司内部搭建的Nuget服务,私有安全,局域网,速度快. 使用方法 VS -> 工具 -> 库程序包管理器 -> 程序包管理器设置 -> 程序包源 -> 新增以下配 ...
- Java虚拟机9:Java类加载机制
前言 我们知道我们写的程序经过编译后成为了.class文件,.class文件中描述了类的各种信息,最终都需要加载到虚拟机之后才能运行和使用.而虚拟机如何加载这些.class文件?.class文件的信息 ...
- MapReduce原理与设计思想
简单解释 MapReduce 算法 一个有趣的例子 你想数出一摞牌中有多少张黑桃.直观方式是一张一张检查并且数出有多少张是黑桃? MapReduce方法则是: 给在座的所有玩家中分配这摞牌 让每个玩家 ...
- 《CLR.via.C#第三版》第二部分第4,5章节读书笔记(二)
这两章全是理论性的东西,我觉得不必过于钻牛角尖.理论这东西,只有在长期的实践中去慢慢领悟才会深刻.下面我只写些我认为重要的关键知识. (一)类型转换 知识点:向基类型的转换被认为是一种安全的隐式转换: ...
- java算法(一)
最近在看各种经典算法,自己写起来: 一.判断素数问题: 知识点:素数即为质数,一个数n若不是质数则一定在2-n/2之间内有因数. package JingDian; public class sush ...
- ubuntu 安装 axel
Axel 通过打开多个 HTTP/FTP 连接来将一个文件进行分段下载,从而达到加速下载的目的.对于下载大文件,该工具将特别有用. 安装:sudo apt-get install axel 一般使用: ...
- 【转载】关于sql server 代理(已禁用代理xp)
原文地址:http://blog.sina.com.cn/s/blog_493cafbb0100qy91.html 症状: SQL SERVER2005里面,启动SQL代理服务,启动正常,但是在sql ...
- 浅谈 MVVM 设计模式在 Unity3D 中的设计与实施
初识 MVVM 谈起 MVVM 设计模式,可能第一映像你会想到 WPF/Sliverlight,他们提供了的数据绑定(Data Binding),命令(Command)等功能,这让 MVVM 模式得到 ...
- Yii Model中添加默认搜索条件
在查询中增加条件 public function defaultScope() { return array( 'condition' => " is_deleted = 0" ...