怎么搭建gerrit代碼審查服務(wù)

exportJAVA_HOME=/usr/local/jdk1.8.0_161exportJRE_HOME=$JAVA_HOME/jreexportCLASSPATH=$JAVA_HOME/libexportPATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$CLASSPATH[gerrit]basePath=git//指定被gerrit管理的所有g(shù)it庫存放位置,即review_site_project/git/canonicalWebUrl=http://192.168.0.20:8081///指定web訪問gerrit的網(wǎng)址//填自己的ip和端口號[database]type=h3//指定gerrit所默認(rèn)數(shù)據(jù)庫類型,可以選用mysql,安裝并創(chuàng)建gerrit賬戶database=db/ReviewDB[auth]type=HTTP//指定瀏覽器登錄gerrit時(shí)的認(rèn)證方式[sendemail]enable=truesmtpServer=smtp.126.comsmtpServerPort=25smtpUser=xxx@126.comsmtpPass=xxxsslVerify=falsefrom=CodeReview<xxx@126.com>[container]user=gerritserver//指定gerrit所在機(jī)器的用戶身份與上文創(chuàng)建的用戶對應(yīng)一致javaHome=/usr/lib/jvm/jdk7/jre//系統(tǒng)本身自帶[sshd]listenAddress=*:29418//指定sshd服務(wù)監(jiān)聽的端口號[httpd]listenUrl=http://*:8081/project//指定http代理地址[cache]directory=cache//緩存位置server{listen80;server_namelocalhost;#charsetkoi8-r;#access_loglogs/host.access.logmain;location/{#roothtml;#indexindex.htmlindex.htm;auth_basic"WelcometoGerritCodeReview!";auth_basic_user_file/home/gerrit/gerrit.passwd;proxy_passhttp://127.0.0.1:8081;proxy_set_headerX-Forwarded-For$remote_addr;proxy_set_headerHost$host;}#error_page404/404.html;#redirectservererrorpagestothestaticpage/50x.html#error_page500502503504/50x.html;location=/50x.html{roothtml;}touch./review_site/etc/passwdhtpasswd-b./review_site/etc/passwdgerritgerrit步驟五:測試,訪問: http://192.168.0.20 ,用gerrit用戶登錄
以上是“CentOS7怎么搭建gerrit代碼審查服務(wù)”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注http://www.vecloud.com/資訊頻道!