gitlab的安装

1、下载rpm 安装包

(1)直接命令下载

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

(2)直接去服务器上下载包

Index of /gitlab-ce/yum/el7/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

2、文件提权

bash 复制代码
chmod 777 gitlab-ce-11.6.10-ce.0.el7.x86_64.rpm

3、安装

bash 复制代码
rpm -ivh gitlab-ce-11.6.10-ce.0.el7.x86_64.rpm

4、更改环境配置

打开配置文件修改external_url。改成自己机器的地址和端口号

bash 复制代码
vim /etc/gitlab/gitlab.rb

启动服务

bash 复制代码
#(每次修改完gitlab.rb文件需要执行该操作)
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-ctl status

5、查看root 的密码

bash 复制代码
vim /etc/gitlab/initial_root_password

6、登录查看

7、修改默认密码

bash 复制代码
  $ gitlab-rails console -e production
  irb> user = User.find_by(username: 'root')
  irb> user.password = 'password'
  irb> user.password_confirmation = 'password'
  irb> user.save!
  irb> exit

重启服务

bash 复制代码
gitlab-ctl restart

8、关闭防火墙

bash 复制代码
systemctl stop firewalld.service

9、永久关闭防火墙

bash 复制代码
systemctl disable firewalld.service
相关推荐
舒一笑6 小时前
程序员效率神器:一文掌握 tmux(服务器开发必备工具)
运维·后端·程序员
Johny_Zhao7 小时前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
haibindev7 小时前
在 Windows+WSL2 上部署 OpenClaw AI员工的实践与踩坑
linux·wsl2·openclaw
NineData8 小时前
数据库管理工具NineData,一年进化成为数万+开发者的首选数据库工具?
运维·数据结构·数据库
梦想很大很大1 天前
拒绝“盲猜式”调优:在 Go Gin 项目中落地 OpenTelemetry 链路追踪
运维·后端·go
Sinclair1 天前
内网服务器离线安装 Nginx+PHP+MySQL 的方法
运维
叶落阁主1 天前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
0xDevNull2 天前
Linux切换JDK版本详细教程
linux
进击的丸子2 天前
虹软人脸服务器版SDK(Linux/ARM Pro)多线程调用及性能优化
linux·数据库·后端