Gerrit 在Fedora上的安装配置


review_site/etc/gerrit.config

  1. [gerrit]  
  2.         basePath = repositories  
  3.         canonicalWebUrl = http://xx.x.xx.xxx/gerrit/  
  4. [database]  
  5.         type = MYSQL  
  6.         hostname = localhost  
  7.         database = reviewdb  
  8.         username = gerrit123  
  9. [auth]  
  10.         type = HTTP  
  11.         logoutUrl = http://www.windriver.com/  
  12. [sendemail]  
  13.         smtpsmtpServer = smtp.mail.yahoo.com.cn  
  14.         smtpUser = wxbuaa  
  15.         smtpServerPort = 465  
  16.         smtpEncryption = SSL  
  17. [user]  
  18.         name = xxxxx.xx  
  19.         email = wxbuaa@yahoo.com.cn  
  20. [container]  
  21.         user = gerrit222  
  22.         javaHome = /usr/java/jre1.6.0_27/  
  23. [sshd]  
  24.         listenAddress = *:29418  
  25. [httpd]  
  26.         listenUrl = proxy-http://*:8080/gerrit/  
  27. [cache]  
  28.         directory = cache  
  29. ~    

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

  1. <VirtualHost *:80>  
  2.     ServerName xx.x.xx.xxx  
  3.   
  4.     ProxyRequests Off  
  5.     ProxyVia Off  
  6.     ProxyPreserveHost On  
  7.   
  8.     <Proxy *>  
  9.           Order deny,allow  
  10.           Allow from all  
  11.     </Proxy>  
  12.   
  13.     <Location /gerrit/>  
  14.       AuthType Basic  
  15.       AuthName "Gerrit Code Review"  
  16.       Require valid-user  
  17.       AuthUserFile /home/gerrit2/review_site/etc/passwd  
  18.     </Location>  
  19.   
  20.     ProxyPass /gerrit/ http://127.0.0.1:8080/gerrit/  
  21. </VirtualHost>  

Fedora 上的sun  jre 配置的命令:

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

相关内容