【环境搭建】GitLab环境搭建

官方地址:https://about.gitlab.com/install/#centos-7

step1

第一步修改成sudo yum install -y curl policycoreutils-python3 openssh-server perl
如果还是报错的话就先配置epel源
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
#sudo yum install -y curl policycoreutils-python openssh-server perl
看看ssh服务开没开 一般都不用管
# Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
sudo systemctl enable sshd
sudo systemctl start sshd
防火墙的配置看一下,内网情况下一般也是关掉,公网环境配合安全组
# Check if opening the firewall is needed with: sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld

step2 安装邮件服务postfix

sudo yum install postfix -y
sudo systemctl enable postfix
sudo systemctl start postfix


step3 下载安装脚本并执行

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

yum install -y gitlab-ee

如果要修改为内网的url,前提是内网有配置好的dns
sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee

成功的小狐狸

step4

修改配置文件
vi/etc/gitlab/gitlab.rb

external_url 'http://127.0.0.1:8000'



修改密码 存放的位置
/etc/gitlab/initial_root_password

报错汇总:

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist

原因是Redhat的dnf 不支持failovermethod 选项  所以需要将此选项注释掉或是删除

vi /etc/yum.repos.d/CentOS-Epel.repo

直接注释掉

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值