GitLab部署安装

GitLab官方:
GitLab官方部署文档:

1、安装依赖 && 关闭防火墙

yum -y install curl policycoreutils-python openssh-server perl
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld

2、配置软件镜像源

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

3、安装gitlab 包比较大需要耐心等待一会~

sudo EXTERNAL_URL="https://10.0.24.5" yum install -y gitlab-jh

安装完成后 配置文件在 /etc/gitlab/gitlab.rb 位置
4、启动gitlab

gitlab-ctl start

其他常用gitlab命令如下:

gitlab-ctl start    # 启动所有组件
gitlab-ctl stop     # 停止所有组件
gitlab-ctl restart  # 重启所有组件
gitlab-ctl status   # 查看组件状态
gitlab-ctl reconfigure  # 启动服务
gitlab-ctl tail         # 查看日志

5、修改默认密码
默认gitlab会随机生成一个免密到 /etc/gitlab/initial_root_password 文件内,仅用于第一次登入,此文件24小时内删除,所以需要尽快修改密码

cat /etc/gitlab/initial_root_password |grep -w Password: 
Password: a4bwOH8fh6TvcFKFdqb0MNu3G2BqBgNyXzzJyZxUcnY=

浏览器访问: https://localhost 注意是https
默认管理用户是 root



更改后 往下滑 点击 保存更改

6、取消注册功能

更改后 往下滑 点击 保存更改

posted @ 2022-11-16 22:03  乱七八糟博客备份  阅读(196)  评论(0编辑  收藏  举报