CentOS7搭建GitLab
2021/7/18 7:09:33
本文主要是介绍CentOS7搭建GitLab,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
开始之前,准备一台全新的centos7系统虚拟机备用
在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问。
注意: su root
1. 安装ssh
sudo yum install -y curl policycoreutils-python openssh-server
2. 启动ssh和设置为开机启动
sudo systemctl start sshd sudo systemctl enable sshd
3. 安装防火墙
# 安装防火墙 yum install firewalld systemd -y # 开启防火墙 service firewalld start # 添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。 sudo firewall-cmd --permanent --add-service=http # 重启防火墙 sudo systemctl reload firewalld
4. 安装邮件服务
# 安装 sudo yum install postfix # 启动 sudo systemctl start postfix
5. 安装gitlab
# 拉取镜像 wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm # 安装 rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
出现如图说明安装成功
需要修改配置:
# 修改gitlab配置文件指定服务器ip和自定义端口: vim /etc/gitlab/gitlab.rb # 重新加载配置和重启 gitlab-ctl reconfigure gitlab-ctl restart
这里有个注意事项,8080是nginx的默认端口, 最后不要使用8080端口。使用的画可能会出现这个错误:
重新启动后,等待几分钟,就安装成功了
这篇关于CentOS7搭建GitLab的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-09flutter3.x_macos桌面os实战
- 2024-05-09Rust中的并发性:Sync 和 Send Traits
- 2024-05-08使用Ollama和OpenWebUI在CPU上玩转Meta Llama3-8B
- 2024-05-08完工标准(DoD)与验收条件(AC)究竟有什么不同?
- 2024-05-084万 star 的 NocoDB 在 sealos 上一键起,轻松把数据库编程智能表格
- 2024-05-08Mac 版Stable Diffusion WebUI的安装
- 2024-05-08解锁CodeGeeX智能问答中3项独有的隐藏技能
- 2024-05-08RAG算法优化+新增代码仓库支持,CodeGeeX的@repo功能效果提升
- 2024-05-08代码报错不用愁,CodeGeeX一键完成代码修复、错误解释的功能上线了!
- 2024-05-08今天开始程序员不用再发愁写commit message了,全部由CodeGeeX自动完成!