zoukankan      html  css  js  c++  java
  • Gerrit(0): Install and Config

    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.163.com smtpServerPort = 465 smtpEncryption = SSL smtpUser = ...@163.com smtpPass = ... from = CodeReview<...@163.com> [container] user = gerrit javaHome = /usr/local/openjdk8-jre [sshd]
    # 连接 gerrit 内部 ssh 服务的地址、端口 listenAddress
    = 192.168.0.254:29418 [httpd] listenUrl = http://192.168.0.254:10080/ [cache] directory = cache

    <可选> nginx.conf: 

    #-----------------------------------------------------------------------------#
            server {
                    listen 192.168.0.254:80;
                    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

    ...

  • 相关阅读:
    centos7安装puppet详细教程(简单易懂,小白也可以看懂的教程)
    centos7.3下安装nginx
    JS实现转动随机数抽奖的特效代码
    【孤独旅者】封装一个三级联动和基于Vue的mintUI三级联动
    【孤独旅者】Vue-封装$on,$emit,$off
    数据可视化,选择Echarts还是Highcharts?
    关于redux和react-redux
    vue 封装一个插件
    vue实现点击回到顶部
    vue实现吸顶
  • 原文地址:https://www.cnblogs.com/hadex/p/6796335.html
Copyright © 2011-2022 走看看