在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                    # 查看日志
相关推荐
承渊政道4 小时前
Linux网络学习【数据链路层、ARP工作过程与ARP欺骗详解】
linux·网络·学习·数据链路层·arp
CS_Zero4 小时前
安卓开发:Linux的android工具命令
android·linux·运维
何中应4 小时前
Grafana如何安装插件
运维·grafana·可观测
女神下凡4 小时前
芯参谋(84):Linux eMMC 驱动开发指南
linux·运维·arm开发·驱动开发·单片机·嵌入式硬件
SEO-狼术4 小时前
Aspose.Email for .NET 26 Crack
运维·服务器
vortex54 小时前
Windows Server IIS 运维配置指南:架构、身份、安全与排障
运维·windows·架构
无足鸟ICT13 小时前
【RHCA+】vmstat命令(监控系统资源)
linux·服务器
闪亮的路灯13 小时前
Linux 安装mqtt服务mosquitto
linux·运维·服务器
HideF14 小时前
nmcli
linux·服务器·网络
qetfw14 小时前
UOS DHCP Relay:跨网段分配与 IP、DNS、网关验证
linux·服务器·网络·tcp/ip·uos