我在我的 Linux 服务器(Linux 版本 2.6.35-23-server Ubuntu 4.4.3-4ubuntu5)上安装 Gerrit 时遇到问题。这就是我得到的:
john@test:/home/gerrit$ sudo jdk1.7.0_45/bin/java -jar gerrit-2.7.war init -
d /home/gerrit/test_site
*** Gerrit Code Review 2.7
***
Create '/home/gerrit/test_site' [Y/n]?
*** Git Repositories
***
Location of Git repositories [git]:
*** SQL Database
***
Database server type [h2]:
*** 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 [/home/gerrit/jdk1.7.0_45/jre]:
Copy gerrit.war to /home/gerrit/test_site/bin/gerrit.war [Y/n]? Y
Copying gerrit.war to /home/gerrit/test_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 [*]: localhost
Listen on port [8080]:
Canonical URL [http://localhost:8080/]:
*** Plugins
***
Prompt to install core plugins [y/N]?
Initialized /home/gerrit/test_site
Executing /home/gerrit/test_site/bin/gerrit.sh start
** ERROR: Gerrit is not initialized in /home/gerrit
error: cannot start Gerrit: exit status 1
Waiting for server on localhost:8080 ... OK
Opening http://localhost:8080/#/admin/projects/ ...OK
然后我无法访问 localhost:8080(未找到 404)。有人认识这个 Gerrit 初始化错误吗?/var/log/apache2/error.log 没有显示任何相关内容。