apt安装gitlab
# 添加官方源
# 参考链接 https://packages.gitlab.com/gitlab/gitlab-ce/install#bash-deb
# 如果在这里脚本下不下来直接去官网复制脚本执行即可
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
# #添加清华源
# #Ensure you have GPG installed
# apt-get install gnupg
# #添加gitlab gpgkey 参考文档 https://packages.gitlab.com/app/gitlab/gitlab-ce/gpg#gpg-apt
# curl -L https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey | apt-key add -
# #添加清华源 参考文档 https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
# echo 'deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main' > /etc/apt/sources.list.d/gitlab-ce.list
# apt install apt-transport-https
# apt-get update
直接安装
apt-get install gitlab-ce
选择版本安装
#查看版本
apt-cache madison gitlab-ce
如下:
root@d4c37e5e1731:/# apt-cache madison gitlab-ce
gitlab-ce | 11.11.0-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
gitlab-ce | 11.10.4-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
gitlab-ce | 11.10.3-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
gitlab-ce | 11.10.2-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
gitlab-ce | 11.10.1-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
gitlab-ce | 11.10.0-ce.0 | https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial/main amd64 Packages
#选择版本
apt-get install gitlab-ce=8.13.5-ce.0
启动gitlab
gitlab-ctl reconfigure