您好,登錄后才能下訂單哦!
gerrit web搭建手冊
安裝openjdk 7
# apt-get install openjdk-7-jdk
安裝apache2
# apt-get install apache2
安裝PostgreSQL數據庫
# apt-get install postgresql
# passwd postgres (修改postgres密碼,默認為:postgres)
# su -postgres
$ createuser --username=postgres –RDIElPS gerrit2 (“l”為字母)
$ createdb --username=postgres -E UTF-8 -O gerrit2reviewdb (“O”為大寫字母)
安裝配置gerrit
下載網址: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 ---------------創建review_site文件夾
Location of Gitrepositories [git]:
Database servertype [H2/?]: postgresql ---------------數據庫的類型選擇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]: ----數據庫的名字為reviewdb,直接回車
Databaseusername [gerrit2]: ----數據庫的用戶為gerrit2,直接回車
gerrit2'spassword : -----輸入gerrit2的密碼。此處gerrit2的密碼要與ubuntu系統的密碼區分開,此處輸入的密碼應該是在數據庫中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,裝完再改)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。