Fork me on GitHub

安装部署Gitlab

一、GitLab 安装准备

GItlab 官网:The One DevOps Platform | GitLab

Gitlab 官方安装文档:GitLab最新版下载安装_GitLab中文免费版-极狐GitLab中文官方网站

1、安装依赖

yum install curl policycoreutils-python openssh-server perl -y

2、(开启sshd服务,并设置为开机自启,默认应该就是开启的)

systemctl start sshd ;systemctl enable sshd

3、配置官方镜像

curl -fsSL https://packages.gitlab.cn/repository/raw/scripts/setup.sh | /bin/bash

##此处需要等待一段时间

4、开始安装

EXTERNAL_URL="http://172.16.1.100" yum install -y gitlab-jh

##此处的IP地址更改为你当前主机的IP地址(需要等待一段时间)

5、启动gitlab

gitlab-ctl start

gitlab-ctl stop
#关闭gitlab

6、通过网页端输入IP地址访问,首次出现502,是因为在初始化刷新即可(如果长时间都502的话,可能是端口被占用了)

 

7、系统默认账号root ,

 首次登录的密码存放位置是:cat /etc/gitlab/initial_root_password 

 

 #这里放的是密码,首次登陆24小时后该文件就会被自动删除

 

 8、更改密码

 

posted @ 2022-08-23 20:06  Alex-Lzy  阅读(216)  评论(0编辑  收藏  举报