CentOS7 SonarQube安装

CentOS7 SonarQube安装

Download

Database

设定Postgres数据库

su postgrespsql -U postgresCREATE USER sonar WITH PASSWORD ‘sonar‘;CREATE DATABASE sonar WITH OWNER sonar ENCODING ‘UTF8‘;\q

Install

  • 安装

上传ZIP文件到/tmp目录下

mkdir /opt/sonarcd /opt/sonarunzip /tmp/sonarqube-5.0.zipunzip /tmp/sonar-runner-dist-2.4.zip

环境变量

在/etc/profile.d目录下新建sonar.sh

#!/bin/bashSONAR_HOME=/opt/sonar/sonarqube-5.0SONAR_RUNNER_HOME=/opt/sonar/sonar-runner-2.4PATH=$SONAR_RUNNER_HOME/bin:$PATHexport SONAR_HOMEexport SONAR_RUNNER_HOMEexport PATH

并赋予执行权限

chmod +x /etc/profile.d/sonar.shsource /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 serversonar.host.url=http://localhost:9084

#----- PostgreSQLsonar.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 settingssonar.jdbc.username=sonarsonar.jdbc.password=sonar

#----- Default source code encodingsonar.sourceEncoding=UTF-8

#----- Security (when ‘sonar.forceAuthentication‘ is set to ‘true‘)sonar.login=adminsonar.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=sonarfirewall-cmd --reload
时间: 2024-07-30 09:55:55

CentOS7 SonarQube安装的相关文章

Centos7下安装及配置PPTP VPN

说到VPN服务,我们大家都知道,VPN是虚拟专用网络(Virtual Private Network)的缩写,VPN有多种分类方式,包括PPTP.L2TP.IPSec等,本文配置的VPN服务器是采用PPTP协议的,PPTP是在PPP协议基础上开发的一种新的增强型安全协议.当然在windows上和linux上都可以部署服务,我们今天主要介绍一下在Centos7下安装及配置PPTP VPN. 因为PPTP是基于PPP协议基础上的,因此需要系统支持PPP,使用 rpm -qa ppp 检查是否安装了P

centos7 &nbsp; Python安装及yum问题解决

centos7  Python安装及yum问题解决 当前系统centos7.2,系统自带Python版本为2.7.5.现在需要使用Python2.6版本,需要降级. 一,安装Python2.6 1.wget下载python,Python版本为2.6.6.wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz 2.解压pythontar xzf Python-2.6.6.tgzcd Python-2.6.6 3.编译安装python

Centos7下安装及配置Zabbix3.0

说到Zabbix相信很多管理员都使用过,因为zabbix所提供的功能给广大管理员们及时得知自己所管理的服务器的服务状态,当然有很多软件服务(cacti.ngios等)都可以实现zabbix类似的功能,但是对于zabbix的功能相对更强大一点,具体就不细说了,今天我们主要介绍一下,Centos7下安装及配置Zabbix3.0的介绍,具体见下: 在安装服务器的时候我们需要注意一些问题:比如服务器的防火墙.selinux等都会影响到Zabbix的正常通信 环境介绍: OS:Centos7 Servic

CentOS-7下安装MySQL5.6.22

CentOS7下安装MySQL5.6.22(当前最新版本:2015-01-17) 转载请注明出处:jiq?钦's technical Blog 一  安装环境 (1)CentOS版本:CentOS-7 查看方法: [[email protected] 桌面]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) 来源:官网下载 下载地址:http://www.centos.org/ (2)MySQL版本:MySQL-5.6.2

在 CentOS7 上安装 MySQL5.7

在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中:cd /usr/local/ 3 创建目录 /usr/local/tools,如果有则忽略: mkdir -p tools 4 创建 /usr/local/mysql 目录,如果已存在则忽略:mkdir -p mysql 5 进入到目录 /usr/local/tools 中:cd tools/ 6 查看系统中是否已安装 MySQL 服务:

Centos7下安装redis实战(单机版以及集群)

一.背景 因项目需要,要引入redis做缓存,就在centos7下亲自安装了一遍redis,刚好趁着这个机会就来把redis的概念以及单机版和集群版redis安装步骤记录下来,在此和大家一起分享. 二.Redis介绍 1.什么是Redis? Redis是用C语言开发的一个开源的高性能键值对(key-value)数据库.它通过提供多种键值数据类型来适应不同场景下的存储需求,目前为止Redis支持的键值数据类型有:字符串类型.散列类型.列表类型.集合类型.有序集合类型. 2.Redis的应用场景:

Centos7下安装php-redis扩展及简单使用

前言: 在本篇博客中,我将给大家介绍如何在Centos7上安装PHP-Redis扩展以及一些简单的实用,关于如何在Centos上安装redis的,可以参考我的上一篇博客 Redis在Centos7上的安装部署 想要在php中操作redis,那就必须安装php-redis扩展,就比如MySQL一样,php想要操作mysql数据库的话,就必须安装mysql扩展,只是在php安装中就默认安装了mysql扩展了. 步骤一:下载解压 下载:https://github.com/nicolasff/phpr

centos7下安装mariadb

参考: http://www.cnblogs.com/Netsharp/p/5875474.html https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1 RDS for MySQL 备份文件恢复到自建数据库 参考: https://help.aliyun.com/knowl

在 CentOS7 上安装 zookeeper-3.4.9 服务

在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/services/zookeeper 目录中: cd /usr/local/services/zookeeper 3.下载 zookeeper-3.4.9.tar.gz: wget https://mirrors.tuna.tsinghua.