1. 安装和配置环境(阿里云服务器可跳过)
```
# sudo yum install curl policycoreutils openssh-server openssh-clients
# sudo systemctl enable sshd
# sudo systemctl start sshd
# sudo yum install postfix
# sudo systemctl enable postfix
# sudo systemctl start postfix
# sudo firewall-cmd --permanent --add-service=http
# sudo systemctl reload firewalld
```
2. 下载
```
# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
# sudo yum install gitlab-ce
```
下载指定版本:
2.1 上此网页上查询需要的版本信息
网址:https://packages.gitlab.com/app/gitlab/gitlab-ce/search
2.2 查询当前系统信息
# uname -a
Linux abcdefg 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
2.3 执行下面语句,填上版本号
复制版本的全名,不要 .rpm