Centos7搭建gitlab
1·、安装ssh服务:yum install -y curl policycoreutils-pythonopenssh-server

2、启动ssh服务并设置为开机自启:
systemctl enable sshd
systemctl start sshd
3、添加http服务到firewalld,pemmanent表示永久生效
4、安装Postfix以发送通知邮件,安装命令:yum -y install postfix

5、将postfix服务设置成开机自启动:
systemctl enable postfix
systemctl start postfix
6、配置gitlab安装源:curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash
7、安装gitlab:sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-jh(https://gitlab.example.com修改为自己的ip地址)
注意:除非您在安装过程中指定了自定义密码,否则将随机生成一个密码并存储在 /etc/gitlab/initial_root_password 文件中(出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure
自动删除,因此若使用随机密码登录,建议安装成功初始登录成功之后,立即修改初始密码)。使用此密码和用户名 root
登录。
9、修改url:vi /etc/gitlab/gitlab.rb
10、重置并启动gitlab:
gitlab-ctl reconfigure
gitlab-ctl restart
11、通过网页访问
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库