您好,登錄后才能下訂單哦!
gerrit web搭建手冊(cè)
安裝openjdk 7
# apt-get install openjdk-7-jdk
安裝apache2
# apt-get install apache2
安裝PostgreSQL數(shù)據(jù)庫
# apt-get install postgresql
# passwd postgres (修改postgres密碼,默認(rèn)為: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相關(guān)的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ū)分開,此處輸入的密碼應(yīng)該是在數(shù)據(jù)庫中g(shù)errit2用戶的密碼(123)
Authenticationmethod [OPENID/?]: ldap-----------選擇用戶認(rèn)證方式
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
啟動(dòng)、關(guān)閉、重啟gerrit
$ ./review_site/bin/gerrit.sh start/stop/restart
訪問:
http://ip:8080
注:
如不想使用8080端口,到~/review_site/etc/gerrit.config里改下,然后重啟gerrit即可(不過安裝時(shí)建議用默認(rèn)的8080,裝完再改)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。