在Linux下安装Gitlab

Cenos7下安装GitLab

在ssh下安装

官方安装文档:https://gitlab.cn/install/?version=ce

1. 使用阿里YUM 镜像云

下载

复制代码
https://mirrors.aliyun.com/repo/Centos-7.repo

替换

复制代码
/etc/yum.repos.d/CentOS-Base.repo

在目录/etc/yum.repos.d/下执行如下命令:

shell 复制代码
curl -o CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
更新镜像源目录
shell 复制代码
yum clean all
yum makecache
yum update

1. 安装依赖

shell 复制代码
yum install -y curl policycoreutils-python openssh-server perl
systemctl enable sshd
systemctl restart sshd

2. 配置镜像

shell 复制代码
curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash

执行完成如下图

3. 开始安装

shell 复制代码
EXTERNAL_URL="http://192.168.1.110" yum install -y gitlab-jh

我的虚拟机是192.168.1.110

安装完成的内容如下图:

启动

shell 复制代码
gitlab-ctl start

访问web页面

复制代码
http://192.168.1.110/users/sign_in

如果访问失败

如果访问失败可能存在的原因是防火墙,先考虑直接将防火墙停掉

shell 复制代码
systemctl stop firewalld

初始用户名密码

根据时候的提示

所以可以知道,用户名为:root,密码需要查看 /etc/gitlab/initial_root_password

我的密码如下:

复制代码
Password: Mwc1hG/IZGQm//4H9zdo+uUg5vZNfzWRNSrxjGNWgHs=

修改密码

修改一个8位长度的密码就好了,密码策略比较简单。比如我就修改一个:Aa1****6

gitlab常用命令

shell 复制代码
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart
gitlab-ctl status
gitlab-ctl reconfigure
vi /etc/gitlab/gitlab.rb
gitlab-ctl tail                    # 查看日志
相关推荐
GGG7665 分钟前
Python 运维自动化:psutil+IPy 系统与网络信息采集深度实战
运维·python·云原生·pip
可乐鸡翅yeah_9 分钟前
个人 / 外包流媒体项目交付实战,M3U8 验收与问题闭环完整工作流
运维·网络·python·低代码·django·m3u8·在线播放
St_rive41 分钟前
移动端自动化环境搭建与准备
运维·自动化
w200512241 小时前
Pod管理
linux·服务器·云原生·容器·k8s·podman
INNOVIX稳石机器人1 小时前
稳石500强实战验证:从人工仓储迈向AI自主智造,给出仓储自动化升级标准答案
运维·人工智能·自动化
飞飞传输1 小时前
国产化 MOVEit 替代:文件传输架构与安全能力深度解读
大数据·运维·安全
聪明蛋子哟2 小时前
浏览器自动化的“持久身份”:多会话认证与Agent技能的无缝集成实践
运维·自动化
千百元2 小时前
ngrok 内网穿透TCP
运维
chen<>2 小时前
C++ 六种 memory_order:从原子性到线程间可见性.md
java·linux·开发语言·c++
一直C2 小时前
Linux系统编程|进程间通信IPC全套详解(1)(管道、信号)
linux·c语言·开发语言·网络·青少年编程·visual studio code