Gerrit Audit Server Setup Easy Tutorial (Ubuntu 12.10)

Source: Internet
Author: User
Tags openid

Original source: http://www.linuxidc.com/Linux/2013-02/79999.htm

1. Install ubuntu12.xx (I am using 12.10, other versions not tested)

2. Configuring the Java Environment

Download Jdk-6u34-linux-x64.bin (Baidu Google), the terminal to perform the installation (if no permissions, then perform chmod a+x jdk-6u34-linux-x64.bin)

$:./jdk-6u34-linux-x64.bin

The installation is performed automatically. When you are finished installing, configure the relevant environment variables

$: Vim ~/.BASHRC

Add the following environment variables: (username for your user name)

Java_home=/home/username/jdk1.6.0_34

Export Jre_home= $JAVA _home/jre

Export classpath= $JAVA _home/lib: $JRE _home/lib: $CLASSPATH

Export path= $JAVA _home/bin: $JRE _home/bin: $PATH

$: Source ~/.BASHRC

Verify that the configuration is successful:

$: java-version

$: Javac

If the above terminal command does not return an error, and has normal version information and help information, it proves that the Java environment configuration is successful and can continue. If there are errors, please Baidu Google.


3. Configure Gerrit.xxx.war

Open terminal, to the directory where Gerrit.xxx.war, execute:

$: Java-jar Gerrit.xxx.war init-d Review_site


Create '/home/username/review_site ' [y/n]?

...

Basically is all the way to go down, the default configuration is good, need to say is the verification method Openid,openid can use Google and Yahoo Mail login, but some times due to GFW reasons, these may not be useful, so you can choose HTTP (recommended). The type of database you manage varies from person to person, with whatever you like, by default, H2.

After the configuration is complete, the gerrit.sh script will be automatically called to start the Gerrit service, and the browser will automatically open, this time must be a failure, because there is no configuration apache2.

You need to make minor changes to the Gerrit configuration file before configuring Apache2, which is review_site/etc/gerrit.config

Change the Canonicalweburl under Field [Gerrit] to https://127.0.0.1:8081/

Change the listenurl under Field [httpd] to proxy-https://127.0.0.1:8081/

Save it.

PS: I was looking for this article, mainly used in the above two lines, where the file also has a field named [httpd], this port number is also consistent with the above.

Gerrit Audit Server Setup Easy Tutorial (Ubuntu 12.10)

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.