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. \r\n\t 转义字符

    https://www.cnblogs.com/lsqbk/p/10259044.html https://www.cnblogs.com/f158w058/p/6548073.html 文件中的换行 ...

  2. mysql 内连接和外连接查询

    一.内连接查询 (笛卡儿积) 内联接查询inner join,mysql可以简写为join 二.外连接查询 左外联接查询left outer join,mysql可以简写为left join右外联接查 ...

  3. Linux NIO 系列(03) 非阻塞式 IO

    目录 一.非阻塞式 IO 附:非阻塞式 IO 编程 Linux NIO 系列(03) 非阻塞式 IO Netty 系列目录(https://www.cnblogs.com/binarylei/p/10 ...

  4. 前端面试题,js预处理部分小结,函数声明提升和变量声明提升

    博客搬迁,给你带来的不便,敬请谅解! http://www.suanliutudousi.com/2017/11/25/%e5%89%8d%e7%ab%af%e9%9d%a2%e8%af%95%e9% ...

  5. 一条简单的 SQL 执行超过1000ms,纳尼?

    作者:VipAugus https://juejin.im/post/5ce906a3e51d455a2f2201dc MySQL对我说"Too young, too naive!" ...

  6. mysql全局权限账户%登录不上ERROR 1045 (28000): Access denied for user 'zzq'@'localhost' (using password: YES)

    mysql中有新建了一个%(允许所有主机连接)和ALL权限的账户.但是竟然连不上.用root或者其他localhost的用户却可以登录.首先检查下防火墙打开了没,可以用service iptables ...

  7. 完全卸载win10上的Ubuntu子系统 - Windows Subsystem for Linux(WSL)

    Ctrl + R 键入: lxrun /uninstall /full 具体请看 microsoft的说明:Frequently Asked Questions

  8. Ansible的roles标准化与Jenkins持续集成(三)

    Ansible的roles标准化与Jenkins持续集成(三) 链接:https://pan.baidu.com/s/1A3Iq3gGkGS27L_Gt37_I0g 提取码:ncy2 复制这段内容后打 ...

  9. alter update

    ## sql alter update 添加.修改.删除字段 ## 添加列名alter table 表名 add 列名 列类型;alter table 表名 add 列名 列类型 not null d ...

  10. Codeforces 348D DP + LGV定理

    题意及思路:https://www.cnblogs.com/chaoswr/p/9460378.html 代码: #include <bits/stdc++.h> #define LL l ...