在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                    # 查看日志
相关推荐
YOYO--小天1 小时前
SSH终端登录与网络共享
运维·ssh
liulilittle2 小时前
Linux 高级路由配置策略之打通双/三网卡路由转发
linux·运维·网络
wanhengidc2 小时前
服务器机架的功能和重要性
运维·服务器
_Chipen2 小时前
5.9-selcct_poll_epoll 和 reactor 的模拟实现
linux·网络·网络协议·tcp/ip
学习编程的gas2 小时前
Linux基本指令(一)
linux·运维·服务器
悟空空心2 小时前
iperf3的介绍与舒勇
linux·网络
一尘之中2 小时前
二进制与十六进制数据转换:原理、实现与应用
linux·c语言·人工智能
凯思软件2 小时前
达索MODSIM实施成本高吗?哪家服务商靠谱?
运维·5g·云计算
风口上的吱吱鼠2 小时前
记录 ubuntu 安装中文语言出现 software database is broken
linux·服务器·前端
newdf观察者3 小时前
penEuler操作系统结合豆包测试github仓库8086-Emulator项目
linux·运维·github