在 mysql 中新建立一个以项目名称 projecte ,用户密码为 shrw@scm (以 projecte 项目为例) mysql> create user 'projecte'@'localh
在 mysql 中新建立一个以项目名称 projecte ,用户密码为 shrw@scm (以 projecte 项目为例)
mysql> create user 'projecte'@'localhost' identified by 'shrw@scm';
Query OK, 0 rows affected (0.02 sec)
新建数据库表
mysql> create database review_shdb;
Query OK, 1 row affected (0.05 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| review_shdb |
+--------------------+
5 rows in set (0.01 sec)
mysql>
mysql> grant all on review_shdb . * to 'projecte'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>
mysql> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
+---------------------------------------+
| query |
+---------------------------------------+
| User: 'root'@'127.0.0.1'; |
| User: 'root'@'::1'; |
| User: 'debian-sys-maint'@'localhost'; |
| User: 'projecte'@'localhost'; |
| User: 'root'@'localhost'; |
+---------------------------------------+
7 rows in set (0.06 sec)
mysql>
~$
~$ java -jar gerrit-2.13.7.war init -d review_projecte/
Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore
[2017-04-23 08:46:36,574] [main] INFO com.google.gerrit.server.config.GerritServerConfigProvider : No /home/review_projecte/etc/gerrit.config; assuming defaults
*** Gerrit Code Review 2.13.7
***
Create '/home/review_projecte' [Y/n]? Y
*** Git Repositories
***
Location of Git repositories [git]: git
*** SQL Database
***
Database server type [h2]: mysql
Gerrit Code Review is not shipped with MySQL Connector/J 5.1.21
** This library is required for your configuration. **
Download and install it now [Y/n]? Y
Downloading https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.21/mysql-connector-java-5.1.21.jar ... OK
Checksum mysql-connector-java-5.1.21.jar OK
Server hostname [localhost]:
Server port [(mysql default)]:
Database name [reviewdb]: review_shdb
Database username [git]: projecte
zxprojectedb's password :
confirm password :
*** User Authentication
***
Authentication method [OPENID/?]: http
Get username from custom HTTP header [y/N]?
SSO logout URL : http://72.246.188.82
*** Review Labels
***
Install Verified label [y/N]?
*** Email Delivery
***
SMTP server hostname [localhost]: smtp.163.com
SMTP server port [(default)]:
SMTP encryption [NONE/?]:
SMTP username [git]: [email protected]
[email protected]'s password :
confirm password :
*** Container Process
***
Run as [git]:
Java runtime [/usr/local/java/jdk1.8.0_131/jre]:
Copy gerrit-2.13.7.war to review_projecte/bin/gerrit.war [Y/n]? Y
Copying gerrit-2.13.7.war to review_projecte/bin/gerrit.war
*** SSH Daemon
***
Listen on address [*]:
Listen on port [29418]:
Gerrit Code Review is not shipped with Bouncy Castle Crypto SSL v152
If available, Gerrit can take advantage of features
in the library, but will also function without it.
Download and install it now [Y/n]? y
Downloading https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.52/bcpkix-jdk15on-1.52.jar ... OK
Checksum bcpkix-jdk15on-1.52.jar OK
Gerrit Code Review is not shipped with Bouncy Castle Crypto Provider v152
** This library is required by Bouncy Castle Crypto SSL v152. **
Download and install it now [Y/n]? y
Downloading https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52.jar ... OK
Checksum bcprov-jdk15on-1.52.jar OK
Generating SSH host key ... rsa... dsa... done
*** HTTP Daemon
***
Behind reverse proxy [y/N]? y
Proxy uses SSL (https://) [y/N]?
Subdirectory on proxy server [/]:
Listen on address [*]:
Listen on port [8081]:
Canonical URL [http://git/]: http://72.246.188.82/
*** Cache
***
*** Plugins
***
Installing plugins.
Install plugin commit-message-length-validator version v2.13.7 [y/N]? y
Installed commit-message-length-validator v2.13.7
Install plugin download-commands version v2.13.7 [y/N]? y
Installed download-commands v2.13.7
Install plugin hooks version v2.13.7 [y/N]? y
Installed hooks v2.13.7
Install plugin replication version v2.13.7 [y/N]? y
Installed replication v2.13.7
Install plugin reviewnotes version v2.13.7 [y/N]? y
Installed reviewnotes v2.13.7
Install plugin singleusergroup version v2.13.7 [y/N]? y
Installed singleusergroup v2.13.7
Initializing plugins.
No plugins found with init steps.
Initialized /home/review_projecte
Executing /home/review_projecte/bin/gerrit.sh start
Starting Gerrit Code Review:
OK
Waiting for server on 72.246.188.82:80 ... OK
Opening http://72.246.188.82/#/admin/projects/ ...FAILED
Open Gerrit with a JavaScript capable browser:
http://72.246.188.82/#/admin/projects/
~$
~$