GitLab 是一個 DevOps、基於 Web 的免費開源平台 Git 儲存庫,為開發人員提供了所有必要的功能。它是一個用於開發 DevOps 應用程式的一體式平台。 GitLab 允許您執行原始碼管理、監控、安全性和專案規劃任務。
Update system packages:
sudo apt update && sudo apt upgrade -y
Install necessary dependencies:
sudo apt install tzdata curl ca-certificates openssh-server
Import GPG key:
gpg_key_url="https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey" curl -fsSL $gpg_key_url| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/gitlab.gpg
Add GitLab repository:
sudo tee /etc/apt/sources.list.d/gitlab_gitlab-ce.list<<EOF
deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main
EOF
Update system packages:
sudo apt update
Install GitLab:
sudo apt install gitlab-ce
Configure GitLab:
sudo gitlab-ctl reconfigure
Confirm GitLab installation:
sudo gitlab-rake gitlab:env:info
Enable required ports:
sudo ufw allow https
sudo ufw allow http
sudo ufw allow ssh
Reload the Firewall:
sudo ufw reload
Start GitLab service:
sudo gitlab-ctl start
Check services status:
sudo gitlab-ctl status
ref.
https://itslinuxfoss.com/install-gitlab-ubuntu-22-04/