1、下载rpm 安装包
(1)直接命令下载
bash
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.6.10-ce.0.el7.x86_64.rpm
(2)直接去服务器上下载包
Index of /gitlab-ce/yum/el7/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

2、文件提权
bash
chmod 777 gitlab-ce-11.6.10-ce.0.el7.x86_64.rpm
3、安装
bash
rpm -ivh gitlab-ce-11.6.10-ce.0.el7.x86_64.rpm
4、更改环境配置
打开配置文件修改external_url。改成自己机器的地址和端口号
bash
vim /etc/gitlab/gitlab.rb

启动服务
bash
#(每次修改完gitlab.rb文件需要执行该操作)
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-ctl status
5、查看root 的密码
bash
vim /etc/gitlab/initial_root_password

6、登录查看

7、修改默认密码
bash
$ gitlab-rails console -e production
irb> user = User.find_by(username: 'root')
irb> user.password = 'password'
irb> user.password_confirmation = 'password'
irb> user.save!
irb> exit
重启服务
bash
gitlab-ctl restart
8、关闭防火墙
bash
systemctl stop firewalld.service
9、永久关闭防火墙
bash
systemctl disable firewalld.service