gitlab舊服務器遷移備份新服務器

1. 安裝新的gitlab服務器
打開
https://mirrors.tuna.tsinghua.edu.cn/help/gitlab-ce/地址進入gitlab community edition鏡像幫助頁面。
Ubuntu:
1) 新人gitlab的gpg公鑰
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add – &>/dev/null
2)添加source.list
vi /etc/apt/sources.list.d/gitlab-ce.list
加入以下內容到gitlab-ce.list文件中:
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu bionic main
3) 安裝gitlab-ce
sudo apt-get update
sudo apt-get install gitlab-ce
CentOS:
1) 新建gitlab-ce.repo
vi /etc/yum.repos.d/gitlab-ce.repo
添加以下內容:
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab- ce/yum/el$releasever/
gpgcheck=0
enabled=1
2) 再次執行緩存清理
sudo yum makecache
sudo yum install gitlab-ce
2. gitlab-ce的簡單配置
1) 修改gitlab.rb
vi /etc/gitlab/gitlab.rb
修改1:
# 例如:pages_external_url “http://127.0.0.1/
原創文章,作者:投稿專員,如若轉載,請註明出處:https://www.506064.com/zh-hk/n/255420.html