Centos安装GitLab

Centos 安装 GitLab

安装必要依赖

1 安装 SSH

sudo yum install -y curl policycoreutils-python openssh-server

#将SSH服务设置成开机自启动,安装命令:
sudo systemctl enable sshd  
#启动
sudo systemctl start sshd

2 安装防火墙

如果已经安装了防火墙并且已经在运行状态,则可跳过

#安装
yum install firewalld systemd -y
# 启动防火墙
service firewalld  start
# 添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。
sudo firewall-cmd --permanent --add-service=http
#重新加载 防火墙
sudo systemctl reload firewalld

3 安装Postfix以发送通知邮件

#安装
sudo yum install postfix
#设置开机自启
sudo systemctl enable postfix
#启动
sudo systemctl start postfix

4 安装GitLab

1 下载 安装 gitlab

这里使用了清华大学的镜像,下载速度飞起

# 下载 el7表示 centos7版本的 如果是centos8 请选择 el8版本
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.7.1-ce.0.el7.x86_64.rpm

#安装 这一步比较久需要耐心等待一下
rpm -i gitlab-ce-13.7.1-ce.0.el7.x86_64.rpm

#修改 gitlab配置文件指定服务器ip和自定义端口  
vim  /etc/gitlab/gitlab.rb # 将 external_url 改为 http://主机IP:想要的端口即可

#重置GitLab 这一步需要点时间
gitlab-ctl reconfigure

#重启 GitLab
gitlab-ctl restart
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值