在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                    # 查看日志
相关推荐
bantinghy39 分钟前
Linux系统TCP/IP网络参数优化
linux·网络·tcp/ip
星期天要睡觉44 分钟前
Linux 综合练习
linux·运维·服务器
saynaihe1 小时前
proxmox8升级到proxmox9
linux·运维·服务器
Delphi菜鸟1 小时前
docker 部署RustDesk服务
运维·docker·容器
Orchestrator_me1 小时前
CentOS交换区处理
linux·运维·centos
zru_96021 小时前
centos 系统如何安装open jdk 8
java·linux·centos
FLS1681 小时前
VMwaer虚拟机安装完Centos后无法联网问题
linux·运维·centos
OctopusMonster1 小时前
centos下gdb调试python的core文件
linux·运维·centos
wanhengidc2 小时前
云手机可以息屏挂手游吗?
运维·网络·安全·游戏·智能手机
一只小白菜~2 小时前
实战记录:H3C路由器IS-IS Level-1邻居建立与路由发布
运维·网络·计算机网络·智能路由器