1、GitLab介绍
GitLab 是一个用于仓库管理系统的开源项目,使 Git 作为代码管理工具,并在此基础上搭建起来的 Web 服务。
Gitlab 是被广泛使用的基于 git 的开源代码管理平台,基于 Ruby on Rails 构建, 主要针对软件开发过程中产生的代
码和文档进行管理,Gitlab 主要针对 group 和 project 两个维度进行代码和文档管理,其中 group 是群组,
project是工程项目,一个 group 可以管理多个 project,可以理解为一个群组中有多项软件开发任务,而一个
project 中可能包含多个 branch,意为每个项目中有多个分支,分支间相互独立,不同分支可以进行归并。
2、GitLab安装
如果某些步骤已经操作过了,则无需执行。
2.1 安装SSH依赖
yum install -y curl policycoreutils-python openssh-server
2.2 启动SSH服务
[root@VM-8-8-centos lighthouse]# systemctl enable sshd
[root@VM-8-8-centos lighthouse]# systemctl start sshd
# 查看启动状态
[root@VM-8-8-centos lighthouse]# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-05-24 11:35:45 CST; 2h 36min ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 1636 (sshd)
CGroup: /system.slice/sshd.service
└─1636 /usr/sbin/sshd -D
2.3 设置防火墙-启用IP转发功能
vim /etc/sysctl.conf
# 在文件末尾添加
net.ipv4.ip_forward = 1
2.4 安装并启动防火墙
yum install firewalld systemd -y
systemctl enable firewalld
systemctl start firewalld
systemctl status firewalld
#查看启动情况
[root@VM-8-8-centos lighthouse]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-05-24 14:20:56 CST; 35s ago
Docs: man:firewalld(1)
Main PID: 29060 (firewalld)
CGroup: /system.slice/firewalld.service
└─29060 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
2.5 添加HTTP服务到firewalld
[root@VM-8-8-centos lighthouse]# firewall-cmd --permanent --add-service=http
success
[root@VM-8-8-centos lighthouse]# systemctl reload firewalld
其中,pemmanent 表示永久生效,若不加 --permanent 系统下次启动后就会失效。
2.6 安装Postfix以发送邮件
yum install postfix
systemctl enable postfix
systemctl start postfix
systemctl status postfix
# 查看启动情况
[root@VM-8-8-centos lighthouse]# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2024-05-24 11:35:45 CST; 2h 50min ago
Main PID: 1360 (master)
CGroup:

最低0.47元/天 解锁文章
5200

被折叠的 条评论
为什么被折叠?



