MacOS 下安装Gerrit
1、安装Gerrit
cd /Project mkdir gerrit mv gerrit-2.7.war gerrit cd gerrit java -jar gerrit-2.7.war init -d .
傻瓜式安装,然后会有很多提示,一路回车即可,需要注意的又两个地方:
是否启用反向代理,输入:y Behind reverse proxy [y/N]? y 认证模式选择,输入:http Authentication method [OPENID/?]: http
2、配置Apache反向代理
编辑/etc/apache2/httpd.conf文件,在最后插入:
<VirtualHost *:80>
ServerName 192.168.1.127
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /login/>
AuthType Basic
AuthName "Gerrit Code Review"
AuthUserFile /Project/gerrit/etc/passwords
Require valid-user
</Location>
AllowEncodedSlashes On
ProxyPass / http://localhost:8081/
</VirtualHost>
3、添加用户
#添加huangsz账户 htpassword -c /Project/gerrit/etc/passwords huangsz #添加chengp账号 htpassword /Project/gerrit/etc/passwords chengp
4、Web访问
浏览器方位:http://192.168.1.127/
本文详细介绍了在MacOS系统环境下安装Gerrit的过程,并提供了配置Apache反向代理的方法,还介绍了如何添加用户及通过Web进行访问。
5543

被折叠的 条评论
为什么被折叠?



