gerrit web搭建手冊
安裝openjdk 7
# apt-get install openjdk-7-jdk
安裝apache2
# apt-get install apache2
安裝PostgreSQL數(shù)據(jù)庫
# apt-get install postgresql
# passwd postgres (修改postgres密碼,默認為:postgres)
# su -postgres
$ createuser --username=postgres –RDIElPS gerrit2 (“l(fā)”為字母)
$ createdb --username=postgres -E UTF-8 -O gerrit2reviewdb(“O”為大寫字母)
安裝配置gerrit
下載網(wǎng)址:https://gerrit-releases.storage.googleapis.com/gerrit-2.11.war
安裝和配置:
$java -jar gerrit.war init -d review_site
Create '/home/zhi.yang/review_site'[Y/n]? y ---------------創(chuàng)建review_site文件夾
Location of Gitrepositories [git]:
Database servertype [H2/?]: postgresql ---------------數(shù)據(jù)庫的類型選擇postgresql
Gerrit Code Reviewis not shipped with MySQL Connector/J 5.1.10
** This library is required for yourconfiguration. **
Download and installit now [Y/n]? y ---------下載并安裝與mysql相關的lib庫
Usemysql-connector-java-5.1.10.jar anyway [y/n]? y
Serverhostname [localhost]:
Server port [(postgresql default)]:
Database name [reviewdb]: ----數(shù)據(jù)庫的名字為reviewdb,直接回車
Databaseusername [gerrit2]: ----數(shù)據(jù)庫的用戶為gerrit2,直接回車
gerrit2'spassword : -----輸入gerrit2的密碼。此處gerrit2的密碼要與ubuntu系統(tǒng)的密碼區(qū)分開,此處輸入的密碼應該是在數(shù)據(jù)庫中gerrit2用戶的密碼(123)
Authenticationmethod [OPENID/?]: ldap-----------選擇用戶認證方式
LDAP server [ldap://localhost]:ldap://10.0.0.9:3268
LDAP username : gerrit
gitserver's password : ******
confirm password : ******
Account BaseDN [DC=0,DC=0,DC=98:3268]: DC=ming,DC=com
Group BaseDN [DC=ming,DC=com]:
Install Verifiedlabel [y/N]?
SMTP serverhostname [localhost]:
SMTP serverport [(default)]:
SMTPencryption [NONE/?]:
SMTP username :
Run as [zhi.yang]:
Java runtime [/usr/lib/jvm/java-7-openjdk-amd64/jre]:
Copy gerrit.war to/home/gerrit2/review_site/bin/gerrit.war [Y/n]?
Listen onaddress [*]:
Listen on port [29418]:
Gerrit Code Reviewis not shipped with Bouncy Castle Crypto v144
If available, Gerrit can take advantage offeatures
in the library, but will also functionwithout it.
Download andinstall it now [Y/n]?
Press enter tocontinue
Continue withoutthis library [Y/n]?
Behind reverseproxy [y/N]?
Use SSL(https://) [y/N]?
Listen onaddress [*]:
Listen on port [8080]:
Canonical URL [http://archivebak.ming.com:8080/]:
Install plugindownload-commands version v2.11 [y/N]?
Install pluginreviewnotes version v2.11 [y/N]?
Install pluginsingleusergroup version v2.11 [y/N]?
Install pluginreplication version v2.11 [y/N]?
Install plugincommit-message-length-validator version v2.11 [y/N]?
Initialized/home/zhi.yang/review_site
啟動、關閉、重啟gerrit
$ ./review_site/bin/gerrit.sh start/stop/restart
訪問:
http://ip:8080
注:
如不想使用8080端口,到~/review_site/etc/gerrit.config里改下,然后重啟gerrit即可(不過安裝時建議用默認的8080,裝完再改)
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
文章題目:gerrit搭建-創(chuàng)新互聯(lián)
文章分享:http://aaarwkj.com/article32/ihhpc.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供微信公眾號、虛擬主機、企業(yè)網(wǎng)站制作、網(wǎng)站導航、外貿(mào)建站、靜態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)