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. 74、Salesforce的String的format方法

    String placehodler = 'Hello {0} , {1} is cool!'; List<String> fillers = new String[]{'Jason',' ...

  2. Struts1.3——Struts入门

    1.Struts的几个基本概念 1.struts是一个开源框架(frameset) 2.struts是一个Web框架 3.struts是一个基于MVC的Web框架 2.为什么有struts 因为我们对 ...

  3. 洛谷 P2023 维护序列——线段树

    先上一波题目 https://www.luogu.org/problem/P2023 复习了一波线段树 题目涉及的操作有区间加 区间乘以及区间求和 tips:线段树在传标记的时候 优先传乘法标记再传加 ...

  4. Spring Cloud Eureka自我保护机制

    自我保护背景 首先对Eureka注册中心需要了解的是Eureka各个节点都是平等的,没有ZK中角色的概念, 即使N-1个节点挂掉也不会影响其他节点的正常运行. 默认情况下,如果Eureka Serve ...

  5. 《linux 内核全然剖析》sched.c sched.h 代码分析笔记

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/u011368821/article/details/25129835 sched.c sched.h ...

  6. MySQL-技术专区-数据库权限管理

    前言 学习mysql数据库,对于它的权限的管理是关键的一环.所以,下面介绍的是MySQL权限的管理. MySQL权限表 MySQL数据库实际上是通过将用户写入mysql库中对应的权限表来控制访问权限的 ...

  7. 我的scoi2018

    高一,很尴尬,凉~ -------- 大家好,我是分界线,我弱弱的说本次采用倒序的写作手法 -------- 故事是这样讲的: Day0: 刚刚去那个电科搞的集训,早上才考了一波模拟赛,下午就过来住酒 ...

  8. 学习笔记-es5新增的一些数组的API(不全)-字符串-字符串API(不全)

    ### es5新增的数组的api + indexOf() 搜索数组中的元素,并返回它所在的位置. arr.indexOf(str,index) 参数: str为要查找的字符串 index为开始查找的下 ...

  9. LeetCode Array Easy121. Best Time to Buy and Sell Stock

    Description Say you have an array for which the ith element is the price of a given stock on day i. ...

  10. 【扯淡篇】CTSC/APIO/SDOI R2时在干什么?有没有空?可以来做分母吗?

    注意: 我比较弱, 并没有办法把外链bgm搞成https, 所以大家可以选择"加载不安全的脚本"或者把https改成http以获得更好的阅读体验! 据说, 退役了要写写回忆录. 但 ...