安装gitlab笔记

安装vim编辑器

复制代码
yum install vim -y

安装ssh协议,在CentOs系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知)wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问

复制代码
yum install -y curl policycoreutils-python openssh-server

设置ssh服务开机自启动

复制代码
systemctl enable sshd

启动SSH服务

复制代码
systemctl start sshd

安装防火墙

复制代码
yum install firewalld systemd -y

开启防火墙

复制代码
service firewalld start

添加HTTP服务到firewalld

复制代码
firewall-cmd --permanent --add-service=http

重启防火墙

复制代码
systemctl reload firewalld

安装Postfix以发送邮件

复制代码
yum install postfix

将postfix服务设置成开机自启动

复制代码
systemctl enable postfix

启动postfix

复制代码
systemctl start postfix

安装wget,用于从外网上下载插件

复制代码
yum -y install wget

找到清华大学开源镜像gitlab安装链接,使用wget访问下载

复制代码
wget http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.4.2-ce.0.el7.x86_64.rpm

安装gitlab

复制代码
rpm -i gitlab-ce-15.4.2-ce.0.el7.x86_64.rpm

将设置好的端口加入防火墙

复制代码
firewall-cmd --zone=public --add-port=1001/tcp --permanent

重启防火墙

复制代码
systemctl reload firewalld

重置gitlab

复制代码
gitlab-ctl reconfigure
```
# 修改root用户密码打开gitlab控制台(gitlab-rails console -e production)找到账户(user=User.where(id:1).first)修改密码(user.password=12345678)保存(user.save!)推出(quit)重启gitlab(gitlab-ctl restart)
相关推荐
忍者算法7 分钟前
AWS VPC 核心笔记(小白向)
笔记·云计算·aws
北温凉9 分钟前
【学习笔记】机器学习(Machine Learning) | 第七章|神经网络(1)
笔记·机器学习
麻雀无能为力43 分钟前
python自学笔记2 数据类型
开发语言·笔记·python
饕餮争锋1 小时前
WebMvcConfigurer介绍-笔记
java·笔记·servlet
houliabc1 小时前
【2025年软考中级】第一章1.5 输入输出技术(外设)
笔记·学习·证书·软考·计算机系统
请你喝好果汁6412 小时前
学习笔记:Conda 环境共享
笔记·学习·conda
代码小将3 小时前
Leetcode76覆盖最小子串
笔记·学习·算法
z35026037063 小时前
dockers笔记
笔记
田梓燊3 小时前
数学复习笔记 15
笔记·线性代数·机器学习
flying robot4 小时前
小结:网页性能优化
笔记