CentOS7中安装Gitlab-ee企业版(完整教程)

官方文档:下载安装_极狐GitLab - 极狐GitLab 官方网站

1. 安装并配置必要的依赖

系统开放http、https、ssh访问,可能有些系统没有安装防火墙使用的是其他安全组件,最后两行可以不执行

sudo yum install -y curl policycoreutils-python openssh-server perl
# 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

安装邮件服务器,用于发送邮件通知,如果使用其他解决方案发送电子邮件,请跳过此步骤

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

2. 下载并安装GitLab包

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

用于安装启动后访问gitlab,这里如果使用https的话安装之后还需要做一些额外的配置

sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee

直接安装,安装之后在编辑访问url,直接安装使用:

sudo yum install -y gitlab-ee

安装完成以后修改文件,设置访问地址external_urlhttp://127.0.0.1:8090/gitlab

vim /etc/gitlab/gitlab.rb
##! Note: During installation/upgrades, the value of the environment variable
##! EXTERNAL_URL will be used to populate/replace this value.
##! On AWS EC2 instances, we also attempt to fetch the public hostname/IP
##! address from AWS. For more details, see:
##! https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
external_url 'http://127.0.0.1:8090/gitlab'

重新应用gitlab的配置

gitlab-ctl reconfigure

3. 查看并修改密码

cat /etc/gitlab/initial_root_password

修改生成的项目地址中的IP地址 127.0.0.1

# 编辑
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
​
# 重启GitLab
gitlab-ctl restart

下一篇:Docker中安装Gitlab-ce

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值