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

    ...

  • 相关阅读:
    金蝶数据库执行语句
    金蝶 更新价格分录表触发器
    金蝶触发器,生成条码信息
    SQL从中文中获取拼音首字母
    C语言 typedef用法
    这姑娘漂亮不,说实话,有糖吃
    条码开发的意义在哪里
    ERP开发,重点不在功能
    金蝶出入库数据库表里加字段后出现的问题解决
    解决金蝶未检测到K/3许可文件,并且该账套已超过演示版期限问题
  • 原文地址:https://www.cnblogs.com/hadex/p/6796335.html
Copyright © 2011-2022 走看看