在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                    # 查看日志
相关推荐
tntxia1 小时前
linux curl命令详解_curl详解
linux
扛枪的书生4 小时前
Linux 网络管理器用法速查
linux
SkyWalking中文站6 小时前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
顺风尿一寸7 小时前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
雪梨酱QAQ9 小时前
Kubeneters HA Cluster部署
运维
江华森13 小时前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森13 小时前
Matplotlib 数据绘图基础入门
运维
XIAOHEZIcode13 小时前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
江华森13 小时前
NumPy 数值计算基础入门
运维
唐青枫15 小时前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux