Ubuntu 18.04安装gerrit 3.0.3
软件环境配置安装Jdk:apt-get install openjdk-8-jre安装Apache:apt-get install apache2安装Git:apt-get gitApache配置反向代理修改文件 vi /etc/apache2/sites-available/000-default.conf<VirtualHost *:80>Se...
作者: 维特网络
分类: 技术分享
时间: 2021-12-27 18:42
阅读量: 189 次
软件环境配置
# 安装Jdk apt-get install openjdk-8-jre # 安装Apache apt-get install apache2 # 安装Git apt-get git
Apache配置反向代理
修改文件
vi /etc/apache2/sites-available/000-default.conf <VirtualHost *:80> ServerName 192.168.1.10 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/passwords </Location> AllowEncodedSlashes On ProxyPass / http://192.168.1.10:8081/ </VirtualHost>
Apache配置 开启SSL、Proxy、Rewrite等模块
cd /etc/apache2/mods-enabled/ ln -s ../mods-available/proxy.load ln -s ../mods-available/proxy.conf ln -s ../mods-available/proxy_http.load ln -s ../mods-available/proxy_balancer.conf ln -s ../mods-available/proxy_balancer.load ln -s ../mods-available/rewrite.load ln -s ../mods-available/ssl.conf ln -s ../mods-available/ssl.load ln -s ../mods-available/slotmem_shm.load ln -s ../mods-available/socache_shmcb.load
创建用户数据文件
# 创建首次登陆管理员用户 htpasswd -cb /home/gerrit/passwords admin admin # 创建其他用户 htpasswd -b /etc/httpd/passwords test test
Gerrit安装与配置
在gerrit安装目录 /home/gerrit 执行:
java -jar gerrit-3.0.3.war init # gerrit下载地址 https://gerrit-releases.storage.googleapis.com/gerrit-3.0.3.war
重要设置
Authentication method [openid/?]: HTTP Behind reverse proxy [y/N]? y Listen on port [8081]: Canonical URL http://192.168.1.10:8081/
启动gerrit
/home/gerrit/bin/gerrit.sh start
相关文章
维特网络是西部数码产品的钻石代理商
2025-10-15
了解详情
配置Gerrit到Gitlab的自动同步
2022-11-21
了解详情
Centos 7安装gitlab-ce-11.6.9
2022-01-01
了解详情
数据中心和IT设施的优先事项
2019-07-01
了解详情
企业布线趋势和新的测试注意事项
2019-05-01
了解详情