Ubuntu18.04 + gerrit2.15.22安装


1. gerrit下载

gerrit官网下载:https://www.gerritcodereview.com/releases-readme.html
如果是在虚拟机安装gerrit,本地PC下载的war包,不能通过vmtools直接拖动复制粘贴到虚拟机内部,会造成包损坏。可以通过scp或者FTP上传。

2. Ubuntu新增gerrit账号

sudo useradd gerrit -m -s /bin/bash
sudo passwd gerrit

# 将gerrit加入sudo权限
sudo vi /etc/sudoers
# 增加 gerrit  ALL=(ALL:ALL) ALL

# 切换到gerrit账号
su gerrit

# 将gerrit-2.15.22.war文件上传到gerrit账户目录,如/home/gerrit
# 修改gerrit-2.15.22.war文件权限为777
chmod 777 gerrit-2.15.22.war

3. 安装git

Linux系统一般默认安装了git

sudo apt-get install git

4. 安装Apache2

sudo apt-get install apache2

5. 配置Apache2

  • 进入apache2设置目录
cd /etc/apache2
  • 修改以下三个配置文件:
    httpd.conf
    apache2.conf
    ports.conf

    ps. httpd.conf文件没有的话需要手动创建
sudo touch /etc/apache2/httpd.conf
sudo vi /etc/apache2/httpd.conf
  • 配置httpd.conf
<VirtualHost *:8080>

    ServerName xxx.xx.xxx.xx: # ubuntu系统IP地址

    ProxyRequests Off
    ProxyVia Off
    ProxyPreserveHost On

    <Proxy *>
          Order deny,allow
          Allow from all
    </Proxy>

    <Location "/login/">
        AuthType Basic
        AuthName "Gerrit Code Review"
        Require valid-user
        AuthBasicProvider file
        AuthUserFile /home/gerrit/review
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值