I. 环境准备
模拟环境:虚拟机(centeros8), 虚拟机内存4G以上
II. 安装
1
| yum install -y curl policycoreutils-python openssh-server
|
centeros8中没有policycoreutils-python的yum源, 暂时不用理会
1 2
| systemctl enable sshd systemctl start sshd
|
- 添加http服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效
1 2 3
| systemctl start firewalld firewall-cmd --permanent --add-service=http systemctl reload firewalld
|
1 2
| systemctl enable postfix systemctl start postfix
|
1
| wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
|
文件源一定要选对(e18对应centeros8, e17对应centeros7)
1
| rpm -i gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm
|
1
| vim /etc/gitlab/gitlab.rb
|
添加 erternal_url: 'http://127.0.0.1:9527'
, ip:端口号
1 2
| gitlab-ctl reconfigure gitlab-ctl restart
|
- 访问端口查看是否成功, 如果不能访问, 关闭防火墙
1
| systemctl stop firewalld
|
1 2
| gitlab-ctl start gitlab-ctl stop
|