centos7安装gitlab

本文详细介绍如何在服务器上安装并配置SSH服务,包括依赖项安装、服务自启动及防火墙设置。此外,还提供了添加GitLab镜像源并安装GitLab服务器的步骤,涵盖镜像添加、安装、配置修改及服务启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一.安装并配置必要的依赖关系

1.安装ssh

sudo yum install -y curl policycoreutils-pythonopenssh-server

2.将SSH服务设置成开机自启动,安装命令:

sudo systemctl enable sshd

3.启动SSH服务,安装命令:

sudo systemctl start sshd

4.开启防火墙,安装命令:

service firewalld start

5.添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。

sudo firewall-cmd --permanent --add-service=http

6.重启防火墙,安装命令:

sudo systemctl reload firewalld

7.安装Postfix以发送通知邮件,安装命令:

sudo yum install postfix

8.将postfix服务设置成开机自启动,安装命令:

sudo systemctl enable postfix

9.启动postfix,安装命令:

sudo systemctl start postfix

二、添加GitLab镜像源并安装gitlab服务器

1.添加gitlab镜像

wget mirrors.tuna.tsinghua.edu.cn/gitlab-ce/y…

2.2.安装gitlab 安装命令:

rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

3.修改gitlab配置文件指定服务器ip和自定义端口:

vi /etc/gitlab/gitlab.rb

4.重置并启动GitLab

gitlab-ctlreconfigure

gitlab-ctl restart

成功

根据之前配置的ip访问就行,默认端口8080

转载于:https://juejin.im/post/5c00b1546fb9a049be5d364d

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值