setup the gerrit

1.装git-daemon
#sudo apt-get install git-daemon-run


2.安装mysql

#sudo apt-get install mysqi-server

3.create database and user for gerrit server

#mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.1.49-1ubuntu8.1 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database reviewdb;

mysql>grant all privileges on reviewdb.* to 'gerrit'@'%' indentified by '<your password>'

mysql>flush privileges;

4.setup java6
recommend sun-java6-jdk

5. Refer to the following source code

java -jar gerrit-2.2.1.war init -d review_site

*** Gerrit Code Review 2.2.1
*** 

Create '/home/jisong-zhu/review_site' [Y/n]? 

*** Git Repositories
*** 

Location of Git repositories [git]: 

*** SQL Database
*** 

Database server type [H2/?]: mysql

Gerrit Code Review is not shipped with MySQL Connector/J 5.1.10
** This library is required for your configuration. **
Download and install it now [Y/n]? 
Downloading http://repo2.maven.org/maven2/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar ... OK
Checksum mysql-connector-java-5.1.10.jar OK
Server hostname [localhost]: 
Server port [(MYSQL default)]: 
Database name [reviewdb]: 
Database username [root]: gerrit2
gerrit2's password : 
  confirm password : 
error: Passwords did not match; try again
gerrit2's password : 
  confirm password : 

*** User Authentication
*** 

Authentication method [OPENID/?]: 

*** Email Delivery
*** 

SMTP server hostname [localhost]: 
SMTP server port [(default)]: 
SMTP encryption [NONE/?]: 
SMTP username : 

*** Container Process
*** 

Run as [root]: 
Java runtime [/usr/lib/jvm/java-6-sun-1.6.0.26/jre]: 
Copy gerrit.war to /home/jisong-zhu/review_site/bin/gerrit.war [Y/n]? 
Copying gerrit.war to /home/jisong-zhu/review_site/bin/gerrit.war

*** SSH Daemon
*** 

Listen on address [*]: 
Listen on port [29418]: 

Gerrit Code Review is not shipped with Bouncy Castle Crypto v144
  If available, Gerrit can take advantage of features
  in the library, but will also function without it.
Download and install it now [Y/n]? 
Downloading http://www.bouncycastle.org/download/bcprov-jdk16-144.jar ... OK
Checksum bcprov-jdk16-144.jar OK
Generating SSH host key ... rsa... dsa... done

*** HTTP Daemon
*** 

Behind reverse proxy [y/N]? 
Use SSL (https://) [y/N]? 
Listen on address [*]: 
Listen on port [8080]: 
Canonical URL [http://jisongzhu-VirtualBox:8080/]: 

Initialized /home/jisong-zhu/review_site
Executing /home/jisong-zhu/review_site/bin/gerrit.sh start
Starting Gerrit Code Review: OK
Waiting for server to start ... OK
Opening browser ...
**
6. At last

explore the url:<Canonical URL> (you can find it on above)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值