Install(Ubuntu 17.04):

apt-get install default-jre daemon [nginx]  #Other OS: install openjdk8-jre [nginx]
wget https://gerrit-releases.storage.googleapis.com/gerrit-2.13.war #2.14 版本不够稳定,使用 2.13 版
java -jar gerrit-2.13.war init -d /installPath

gerrit.config:

[gerrit]
basePath = git
serverId = ecf8d527-9d8e-4c2a-aca3-b7727ff9011c
# 提供服务的地址、端口
canonicalWebUrl = http://192.168.0.254:10080/
[database]
type = h2
database = /usr/home/gerrit/codeReview/db/ReviewDB
[index]
type = LUCENE
[auth]
type = OPENID
[receive]
enableSignedPush = false
[sendemail]
smtpServer = smtp..com
smtpServerPort =
smtpEncryption = SSL
smtpUser = ...@.com
smtpPass = ...
from = CodeReview<...@.com>
[container]
user = gerrit
javaHome = /usr/local/openjdk8-jre
[sshd]
# 连接 gerrit 内部 ssh 服务的地址、端口
listenAddress = 192.168.0.254:
[httpd]
listenUrl = http://192.168.0.254:10080/
[cache]
directory = cache

<可选> nginx.conf:

#-----------------------------------------------------------------------------#
server {
listen 192.168.0.254:;
server_name gerrit.peersafe.com; auth_basic "Hello World!";
auth_basic_user_file /usr/home/gerrit/codeReview/pwd.conf; location / {
proxy_pass http://127.0.0.1:10080;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}
}
#-----------------------------------------------------------------------------#

<可选,nginx 认证需要> Create pwd.conf:

echo "yourUserName:$(openssl passwd -crypt yourPassWord)" >> pwd.conf

Ops:

.../bin/gerrit.sh start/restart/stop

...

Gerrit(0): Install and Config的更多相关文章

  1. install and config redis on ubuntu14.04

    1.installation: (1)download redis from http://redis.io/download (2)installation: $ tar -xvf redis-3. ...

  2. C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Team Foundation\4.0\Cache\VersionControl.config is not valid and cannot be loaded.

    Recently, we experienced a strange problem with TFS 2010. We spent a few days before we figured it o ...

  3. vue安装之后的报错处理---chromedriver@2.35.0 install: `node install.js`

    报错:chromedriver@2.35.0 install: `node install.js` 这个错误的解决方法就是在你创建的项目目录,比如你创建的项目叫myVue,然后你就要在myVue这个目 ...

  4. npm ERR! errno 1 npm ERR! chromedriver@2.35.0 install: `node install.js`

    在使用webpack+vue-cli进行vue项目构建时可能会出现一下错误,webpack@3.10.0及以上版本和vue-cli@2.9.2及以上版本会自动安装依赖(我在自己电脑上测试是这样的)不用 ...

  5. peomethues 参数设置 监控网站 /usr/local/prometheus-2.13.0.linux-amd64/prometheus --config.file=/usr/local/prometheus-2.13.0.linux-amd64/prometheus.yml --web.listen-address=:9999 --web.enable-lifecycle

    probe_http_status_code{instance="xxxx",job="web_status"} probe_http_status_code{ ...

  6. yii-basic-app-2.0.5/basic/config/web.php

    <?php $params = require(__DIR__ . '/params.php'); $config = [ 'id' => 'basic', 'basePath' => ...

  7. 【vue-cli 3.0】 vue.config.js配置 - 路径别名

    如何配置vue-cli 3中vue.config.js的路径别名? 前段时间更新电脑重装了一下vue-cli,发现了vue-cli已经更新到3.0版.用来搭建项目后发现简化了很多,而且配置文件现在可以 ...

  8. 【webpack4.0】---dev.config.js基本配置(六)

    一.开发环境配置准备 1.创建dev.config.js文件 用来配置开发环境的代码 2.安装webpack-merge cnpm install webpack-merge -D 用来合并webpa ...

  9. 【webpack4.0】---base.config.js基本配置(五)

    一.创建项目初始化 1.初始化项目npm init -y 2.创建 src (用来存放开发环境的代码)文件夹.  config (用来存放webpack的配置项)文件夹 3.安装webpack  We ...

随机推荐

  1. 【计算机网络mooc】二、物理层

    1.物理层基本概念 物理层只考虑传输bit流,不包括网线等传输媒体(可认为是第0层),屏蔽传输媒体的差异,不同的传输媒体定义不同标准. 主要任务:确定与传输媒体的接口的特性. 机械特性:网线上面的水晶 ...

  2. VMware里克隆出来的CentOS Linux device eth0 does not seem to be present, delaying initialization

    解决办法:1.ifconfig eth1 确定新网卡的MAC地址.nmcli con 确定新网卡的UUIDvim /etc/udev/rules.d/70-persistent-net.rules把原 ...

  3. PAT_A1089#Insert or Merge

    Source: PAT A1089 Insert or Merge (25 分) Description: According to Wikipedia: Insertion sort iterate ...

  4. Java语言基础及java核心

    一.Java语言特点 1. 简单 2. 面向对象 3. 分布式 4. 健壮 5. 安全 6. 中性架构跨平台 7. 超强的可移植性 8. 高性能 9. 多线程 二.java的环境变量 JAVA_HOM ...

  5. Java8环境设置

    假设你已经安装在 C:Program Filesjavajdk 目录: 在“我的电脑”右键单击并选择“属性”. 在“高级”选项卡下单击“环境变量”按钮. 现在,改变“Path”变量,因此,它也包含了路 ...

  6. 时间同步服务器NTP

    NTP服务器        NTP(Network Time Protocol)[网络时间协议],它是用来同步网络中各个计算机的时间的协议,它可以提供高精准度的时间校正(LAN上与标准间差小于1毫秒, ...

  7. 3.3-Cypher语言及语法使用

    Cypher是一种图数据库查询语言,表现力丰富,查询效率高,其地位和作用与关系型数据库中的SQL语言相当. Cypher具备的能力: Cypher通过模式匹配图数据库中的节点和关系,来提取信息或者修改 ...

  8. idea部署tomcat项目时,在项目里打断点不能拦截

    以下内容都是基于我自己的项目(如未解决道友们的问题,请别介意) idea部署tomcat项目时,在项目里打断点不能拦截,工作中遇到的问题,记录一下(tomcat6) 当项目的以下内容配置完毕后,启动项 ...

  9. LLppdd never give up!

    LLppdd never give up! Time Limit: 1 s Memory Limit: 256 MB 题目背景 LLppdd是个被毒害的小朋友,他的初中生涯充满了坎坷. 直到初三的某一 ...

  10. RK3288 GPIO控制

    参考: https://blog.csdn.net/kris_fei/article/details/69553422