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
相关推荐
馨谙1 天前
shell编程三剑客------sed流编辑器基础应用大全以及运行示例
linux·运维·编辑器
驱动探索者1 天前
Linux list 设计
linux·运维·list
遇见火星1 天前
在Linux中使用parted对大容量磁盘进行分区详细过程
linux·运维·网络·分区·parted
yuyousheng1 天前
CentOS7更换为阿里源
linux·c语言
github.com/starRTC1 天前
Claude Code中英文系列教程17:将Claude Code集成在GitLab工作流里面
git·gitlab·github
微露清风1 天前
系统性学习Linux-第一讲-Linux基础指令
java·linux·学习
zl_dfq1 天前
Linux 之 【日志】(实现一个打印日志的类)
linux
EmbedLinX1 天前
一文理解后端核心概念:同步/异步、阻塞/非阻塞、进程/线程/协程
linux·服务器·c语言·网络
zhangrelay1 天前
linux下如何通过与AI对话设置thinkpad电池充电阈值
linux·运维·笔记·学习
小王努力学编程1 天前
LangChain——AI应用开发框架(核心组件2)
linux·服务器·c++·人工智能·python·langchain·信号