sudo apt-get install -y curl openssh-server ca-certificates
安装Postfix服务用来发送通知邮件,使用其他SMTP服务器可以跳过此步。
sudo apt-get install -y postfix
添加镜像源:
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
echo "deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu bionic main" > /etc/apt/sources.list.d/gitlab-ce.list
sudo apt-get update
安装GitLab:
sudo EXTERNAL_URL="https://gitlab.example.com" apt-get install gitlab-ce
将https://gitlab.example.com
替换为自己的链接,GitLab将自动从Let‘s Encrypt获取证书。
第一次访问时,将提示重置密码,默认账户名为root
。
启动/停止/重启/强制停止/状态
gitlab-ctl start/stop/restart/kill/status
重新获取HTTPS证书
gitlab-ctl renew-le-certs
清除所有数据
gitlab-ctl cleanse
卸载
gitlab-ctl uninstall
原文:https://www.cnblogs.com/5iwkt/p/14014816.html