歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Gerrit 在Ubuntu 11.04上的安裝與配置

Gerrit 在Ubuntu 11.04上的安裝與配置

日期:2017/2/28 16:08:34   编辑:Linux教程

1,安裝

下載地址:http://code.google.com/p/gerrit/downloads/list

或者用git取最新的code。

2、配置

如果你是用git或者源碼的話,可以參考 源碼的 Documentation/install.txt

先配置好 數據庫,我選的是mysql

CREATE USER 'xwang4'@'localhost' IDENTIFIED BY 'yoyo';

CREATE DATABASE reviewdb;

ALTER DATABASE reviewdb charset=latin1;

GRANT ALL ON reviewdb.* TO 'xwang4'@'localhost';

FLUSH PRIVILEGES;

然後初始化:

# java -jar gerrit-2.2.1.war init -d /home/xwang4/kunlun/gerrit/sites

  1. xwang4@PEK-xwang4-Ubuntu:~/kunlun/gerrit$ java -jar gerrit-2.2.1.war init -d /home/xwang4/kunlun/gerrit/sites
  2. *** Gerrit Code Review 2.2.1
  3. ***
  4. *** Git Repositories
  5. ***
  6. Location of Git repositories [/home/xwang4/workspace/gingerbread-kunlun/devel]:
  7. *** SQL Database
  8. ***
  9. Database server type [MYSQL/?]:
  10. Server hostname [localhost]:
  11. Server port [(MYSQL default)]:
  12. Database name [reviewdb]:
  13. Database username [xwang4]:
  14. Change xwang4's password [y/N]?
  15. *** User Authentication
  16. ***
  17. Authentication method [DEVELOPMENT_BECOME_ANY_ACCOUNT/?]: ?
  18. Supported options are:
  19. openid
  20. http
  21. http_ldap
  22. client_ssl_cert_ldap
  23. ldap
  24. ldap_bind
  25. development_become_any_account
  26. Authentication method [DEVELOPMENT_BECOME_ANY_ACCOUNT/?]: openid
  27. *** Email Delivery
  28. ***
  29. SMTP server hostname [hhhhhhhhhhhhhhhhhhhhhhhhhhhh]:
  30. SMTP server port [25]:
  31. SMTP encryption [TLS/?]:
  32. SMTP username [xwang4]:
  33. Change xwang4's password [y/N]?
  34. *** Container Process
  35. ***
  36. Run as [xwang4]:
  37. Java runtime [/usr/lib/jvm/java-6-sun-1.6.0.26/jre]:
  38. Upgrade /home/xwang4/kunlun/gerrit/sites/bin/gerrit.war [Y/n]?
  39. Copying gerrit.war to /home/xwang4/kunlun/gerrit/sites/bin/gerrit.war
  40. *** SSH Daemon
  41. ***
  42. Listen on address [*]:
  43. Listen on port [29418]:
  44. *** HTTP Daemon
  45. ***
  46. Behind reverse proxy [y/N]?
  47. Use SSL (https://) [y/N]?
  48. Listen on address [*]:
  49. Listen on port [8088]:
  50. Canonical URL [http://PEK-xwang4-ubuntu:8088/]:

然後啟動: bin/gerrit.sh restart

如果使用openid的話,注冊的時候,會提示:Provider is not supported, or was incorrectly entered.

sudo ln -sf /etc/java-6-sun/security/cacerts /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts

Copyright © Linux教程網 All Rights Reserved