Install Gerrit server on Ubuntu 18.04

閱讀時間約 6 分鐘
Step 1. Install requirements
$ sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2–2 liblzo2-dev lzop git-core curl u-boot-tools mtd-utils android-tools-fsutils openjdk-8-jdk evice-tree-compiler gdisk m4 libz-dev
Step 2. Download REPO
$ mkdir ~/bin
Step 3. Install Gerrit server
$ mkdir ~/gerrit
$ export GERRIT_SITE=~/gerrit
$ java -jar gerrit*.war init — batch — dev -d $GERRIT_SITE
Step 4. Edit the gerrit.config & Launch Gerrit server
I use the simple login strategy. If you have an LDAP server, you can use LDAP for login.
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
The detail the gerrit.config as shown:
$ cat ${GERRIT_SITE}/etc/gerrit.config
[gerrit]
basePath = git
canonicalWebUrl = http://xx.xx.xx.xx:8080/
serverId = xxx
[container]
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
javaOptions = "-Xmx4096m"
user = abc
javaHome = /usr/lib/jvm/java-11-openjdk-amd64
[index]
type = lucene
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
[receive]
enableSignedPush = false
[sendemail]
enable = true
smtpServer = mail.xxx.com
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8080/
[cache]
directory = cache
[plugins]
allowRemoteAdmin = true
Launch Gerrit server
$ cd ${GERRIT_SITE}/bin
$ sudo ./gerrit.sh start
Step 5. Regist an account on your Gerrit server
Open the Gerrit website
http://${gerrit_server_IP}:8080
Regist an account
Step 6. Setup SSH key & Verify SSH connection
Setup SSH key
1. Get your ssh-key from ~/.ssh/id_rsa.pub
$ cat ~/.ssh/id_rsa.pub
2. Copy the string of id_rsa.pub and paste it into "New SSH key"
3. Verify SSH connection
$ ssh -p 29418 USER_NAME@${gerrit_server_IP}
If successful, you will get the message as follows.
**** Welcome to Gerrit Code Review ****
Hi USER_NAME, you have successfully connected over SSH.
Unfortunately, interactive shells are disabled.
To clone a hosted Git repository, use:
git clone ssh://USER_NAME@${gerrit_server_IP}:29418/REPOSITORY_NAME.git
Connection to ${gerrit_server_IP} closed by remote host.
Connection to ${gerrit_server_IP} closed.
    0會員
    1內容數
    留言0
    查看全部
    發表第一個留言支持創作者!
    你可能也想看
    How To Install DBeaver(管理DB) on Ubuntu 22.04|20.04|18.04Install Java (OpenJDK) on Ubuntu: sudo apt update && sudo apt -y install default-jdk java -version Add repository and install DBeaver CE: curl -
    Thumbnail
    avatar
    iBonnie_愛邦尼
    2024-02-29
    DOCKER_安裝_Install_Ubuntu22.04Docker_ubuntu22.04_安裝
    avatar
    iBonnie_愛邦尼
    2024-01-24
    VCENTER 8 (VCSA) 安裝_Install本文將介紹如何在ESXI 8上安裝vCenter Server以及相關設定步驟,包括ISO光碟檔下載、掛載ISO、填入安裝目標、設定網域以及管理者密碼等。
    Thumbnail
    avatar
    iBonnie_愛邦尼
    2024-01-24
    ESXi_8_HOST_安裝_install1.開機前插入USB指定開機後,依據畫面指示安裝即可。 2.設定IP 按F2 Configure Management Network IPv4 Configuration Set Static IPv4 address and Network configuration 依據實際...
    avatar
    iBonnie_愛邦尼
    2024-01-24
    解決 python 問題: setup.py install is deprecated解決 setuptools 的問題: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. 解決方法 目前
    Thumbnail
    avatar
    愛看電視的小上進
    2024-01-08
    Install minicom on Raspberry pi插上RS232 轉USB的線之後,會在/dev下出現一個ttyUSB0的裝置 接著設定minicom
    avatar
    艾利斯
    2022-10-20
    Composer install/update/require 差別Composer是PHP的軟體包管理系統,它提供用於管理PHP軟體和依賴庫關係的標準格式。(引用自維基百科) composer install composer update 這個指令會更新composer.json中指定的套件版本,比如在require中這樣寫: 但如果是這樣: 本筆記參考:
    avatar
    Vic Lin
    2022-05-19
    inshallah就像叫佛地魔那個人一樣,他們不屑稱那塊土地為以色列,他們說disney land,迪士尼樂園,佐以嘴角的嘲弄。 「問題從來都不是宗教,是那顆貪婪的心。」 二十六歲,開網頁設計公司,我的boss,在大馬士革的日子都住在他辦公室。 「我們只想要和平的改變。」
    Thumbnail
    avatar
    yanruts
    2022-03-20
    【驚爆內幕】王不見王?Gerrit Cole和Trevor Bauer的大學棒球年代(4)當被問到彼此間的關係,兩人都選擇相互恭維和取笑吐槽,儘管感覺得出這片平靜的水域下泡沫正在翻騰。舉個例子:Cole說自己才是純正的強力型投手,球速同樣不慢的Bauer則是個「混合型投手」或是「搭便車者」,但這番說法卻讓Bauer備感困擾...
    Thumbnail
    avatar
    正義鷹大俠
    2021-06-20