Install Gerrit in Ubuntu

Source: Internet
Author: User
Install Gerrit in Ubuntu and configure Gerrit to use mysql database (Reason: I am familiar with mysql). use http authorization mode and apache reverse proxy. Use the personal email software version Ubuntu12.04Gerrit2.4.1Apache2.2.22Mysql5.5.24 in SMTP 163... install Gerrit in Ubuntu and configure Gerrit to use mysql database (Reason: I am familiar with mysql). use http authorization mode and apache reverse proxy. SMTP uses the personal mail software version Ubuntu 163 Gerrit 2.4.1 Apache 2.2.22 Mysql 5.5.24. The following is a good joke: www.2cto.com. I believe that you can install mysql and apache. sudo apt-get is complete. Configure the DATABASE: create user 'gerrit2' @ 'localhost' identified by 'secret'; create database reviewdb; alter database reviewdb charset = latin1; grant all on reviewdb. * TO 'gerrit2' @ 'localhost'; flush privileges; this is the code obtained from the official documentation, where I did not use alter database reviewdb charset = latin1.
According to some information on the Internet, the installation of utf8 will fail, but I have never encountered it. Gerrit does not support Chinese, so try to use English. Install Gerrit java-jar gerrit-$ version-rc1.war init-d review_site and press enter all the way, I prefer to modify the configuration file myself. Vi review_sit/etc/gerrit. config [gerrit] basePath = git canonicalWebUrl = 192.168.1.254: 8081 [database] type = MYSQL hostname = localhost database = reviewdb username = gerrit2 [auth] type = HTTP [sendemail] smtpServer = smtp.163.com smtpUser = wangconglin87@163.com from = wangconglin87@163.com [container] user = gerrit2 javaHome =/opt/jdk1.7.0 _ 05/jre [sshd] www.2cto.com listenAddress = 192.168.1.254: 29418 [httpd] listenUrl = proxy- http://192.168.1.254:8081 [Cache] directory = cache and vi review_sit/etc/gerrit. config, the following mima indicates your password [database] password = mima // database user gerrit2 password [sendemail] smtpPass = mima // your email password and then configure apche to/etc/apache2 all files under the/sites-enabled Directory are deleted, (I am a new installation ). Why is it deleted, because after I have configured the installation materials, sometimes it works normally and sometimes it cannot run. I have been depressed for a long time. There is a default virtual host. Then, in the/etc/apache2/sites-enabled Directory, vi proxy-gerrit, and enter: ServerName a.wangconglin.cn ProxyRequests Off ProxyVia Off ProxyPreserveHost On Order deny, allow Allow from all AuthType Basic AuthName "Gerrit Code Review" Require valid-user AuthBasicProvider file AuthUserFile/home/gerrit2/passwordsWww.2cto.com ProxyPass/http: // 192.168.1.254: 8081/ProxyPassReverse/http: // 192.168.1.254: 8081/ The above AuthUserFile/home/gerrit2/passwords generates an example command: htpassword/home/gerrit2/passwords [username] run Gerrit:/home/gerrit2/review_site/bin/gerrit. before sh start-d/home/gerrit2/review_site uses git push, gerrit cannot directly overwrite any branch in the git code base, but pushes the change to another refspce. Git config remote. origin. push refs/heads/*: refs/for/* git push origin
Author Wang Conglin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.