GitLab服務搭建

2021-10-01 17:33:28 字數 2582 閱讀 7578

1、檢視自己的系統版本,在官網中選擇適配的系統

$ cat /etc/redhat-release

centos linux release 7.5.1804 (core)

2、安裝和配置必要的依賴
$ yum install -y curl policycoreutils-python openssh-server

已載入外掛程式:fastestmirror, langpacks

3、新增gitlab包庫並安裝
$ curl -ss  |

sudo

bash

detected operating system as centos/7.

checking for curl...

detected curl...

downloading repository file:

done.

installing pygpgme to verify gpg signatures...

...the repository is setup! you can now install packages.

4、安裝
$ external_url=

"" yum install -y gitlab-ce

已載入外掛程式:fastestmirror, langpacks

loading mirror speeds from cached hostfile

正在解決依賴關係

--> 正在檢查事務

...

修改gitlab配置檔案指定伺服器ip和自定義埠:

執行 reconfigure 和 restart

gitlab-ctl reconfigure

starting chef client, version 14.13.11

resolving cookbooks for run list: [

"gitlab"

]synchronizing cookbooks:

- gitlab (0.0.1)

...

$ gitlab-ctl restart

ok: run: alertmanager: (pid 28679) 0s

ok: run: gitaly: (pid 28694) 0s

ok: run: gitlab-exporter: (pid 28710) 0s

瀏覽器中,輸入你對應的埠(埠可在/etc/gitlab/gitlab.rb中設定,即external_url),正常開啟介面

在執行 gitlab-ctl reconfigure 遇到報錯

----------------------------------更新

不好意思,我也忘了當時那個坑是怎麼解決的了…

搭建gitlab服務

sudo yum install y curl policycoreutils python openssh server sudo yum install postfix 安裝 sudo systemctl enable postfix 開機自啟動 sudo systemctl start pos...

GitLab伺服器搭建

這幾天有個同事在搭建gitlab伺服器,按照官網的教程搭建好之後clone時總是找不到倉庫,各種嘗試都不行,最後用下面的方案解決了。sudo yum install curl openssh server openssh clients postfix cronie sudo service pos...

Gitlab伺服器搭建

gitlab install todo 參考gitlab的官方文件,需要關注memory一條,實際使用中發現需要2gb ram 2g swap才能正常安裝 執行gitlab。需要注意的是預設系統配置中沒有使用swap,之前沒有接觸過伺服器端不清楚這是不是雲伺服器的普遍配置方式。安裝 配置gitlab...