红联Linux门户
Linux帮助

Gerrit在Fedora上的安装配置

发布时间:2014-12-15 09:36:50来源:linux网站作者:waynebuaa

review_site/etc/gerrit.config

[gerrit] 
basePath = repositories 
canonicalWebUrl = http://xx.x.xx.xxx/gerrit/ 
[database] 
type = MYSQL 
hostname = localhost 
database = reviewdb 
username = gerrit123 
[auth] 
type = HTTP 
logoutUrl = http://www.windriver.com/ 
[sendemail] 
smtpsmtpServer = smtp.mail.yahoo.com.cn 
smtpUser = wxbuaa 
smtpServerPort = 465 
smtpEncryption = SSL 
[user] 
name = xxxxx.xx 
email = wxbuaa@yahoo.com.cn 
[container] 
user = gerrit222 
javaHome = /usr/java/jre1.6.0_27/ 
[sshd] 
listenAddress = *:29418 
[httpd] 
listenUrl = proxy-http://*:8080/gerrit/ 
[cache] 
directory = cache 
~


apache 的配置文件/etc/httpd/conf.d/gerrit.conf

<VirtualHost *:80> 
ServerName xx.x.xx.xxx 
 
ProxyRequests Off 
ProxyVia Off 
ProxyPreserveHost On 
 
<Proxy *> 
Order deny,allow 
Allow from all 
</Proxy> 
 
<Location /gerrit/> 
AuthType Basic 
AuthName "Gerrit Code Review" 
Require valid-user 
AuthUserFile /home/gerrit2/review_site/etc/passwd 
</Location> 
 
ProxyPass /gerrit/ http://127.0.0.1:8080/gerrit/ 
</VirtualHost>


Fedora 上的sun  jre 配置的命令:

sudo chmod +x ./jre-6u27-linux-i586-rpm.bin  
sudo ./jre-6u27-linux-i586-rpm.bin  
sudo alternatives --install /usr/bin/java java /usr/java/jre1.6.0_27/bin/java 20000 
sudo alternatives  --config java 
java -version