返回「计算机、信息技术与工程」

Gitlab服务器配置

更多
Markdown 结构化数据
本文目录 2 个章节

Gitlab服务器配置

# Gitlab服务器配置

创建时间:2021/4/27 14:53

配置流程

安装依赖包: sudo apt-get install curl openssh-server ca-certificates postfix

执行完成后,出现邮件配置,选择Internet那一项(不带Smarthost的)

利用清华大学的镜像来进行主程序的安装,按照链接中的步骤做就可以: https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

配置GitLab IP地址和端口号: sudo -e /etc/gitlab/gitlab.rb external_url "http://192.168.1.xxx:8085"

根据自己的需求设置端口号,不要跟其他程序冲突就可以。

如果开启额防火墙,需要把相应的端口放开,例如使用 firewalld 防火墙,则输入以下命令 firewall-cmd --zone=public --add-port=8085/tcp --permanent

应用配置: gitlab-ctl reconfigure

重启: 其他内网的任意一台计算机上使用浏览器访问: http://192.168.1.xxx:8085

注意:由于使用的是http协议,在网页上不输入http,会默认使用https,报错: This site can’t provide a secure connection

ref

https://www.jianshu.com/p/8079a9a81ef3