安装gitlab笔记

本文详细介绍了在CentOS系统上安装Vim编辑器,配置SSH服务、防火墙(包括HTTP和SSH端口开放),安装Postfix发送邮件,以及部署和定制GitLab的过程,包括防火墙规则调整和密码修改。
摘要由CSDN通过智能技术生成

安装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

修改ip和自定义端口

·````
vim /etc/gitlab/gitlab.rb

j将 external_url 设置成自己的ip和刚才设置1001端口



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

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)
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

正函数 

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值