Centos7 安装私有 Gitlab

在 CentOS 7上,下面的命令也会在系统防火墙中打开 HTTP、HTTPS 和 SSH 访问。这是一个可选步骤,如果您打算仅从本地网络访问极狐GitLab,则可以跳过它。

sudo yum install -y curl policycoreutils-python openssh-server perl
sudo systemctl enable sshd
sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld

(可选)下一步,安装 Postfix 以发送电子邮件通知。如果您想使用其他解决方案发送电子邮件,请跳过此步骤并在安装极狐GitLab 后++配置外部 SMTP 服务器++。

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

下载/安装极狐GitLab

配置极狐GitLab 软件源镜像。

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

执行命令安装

sudo EXTERNAL_URL="http://192.168.110.60:8100" yum install -y gitlab-jh

地址设置成你本机的 ip 地址,后续通过本 ip:port --- http://192.168.110.60:8100 访问登录界面

下载安装过程时间较长,内心等待即可。

Tips:若安装完成后启动访问界面提示 502,多半原因是端口冲突导致。

gitlab 默认的配置文件路径为 /etc/gitlab/gitlab.rb

若前期EXTERNAL_URL设置错误可以直接修改本文件中对应的值

修改配置完成后执行命令

sudo gitlab-ctl reconfigure

修改 root 账号密码

cd /opt/gitlab/bin/    #gitlab铡疹臂隘
gitlab-rails console   #恋幼 gitlab 谤悬明 
==========================================================
u=User.find(1)         #汹漠root便肮
u.password='娱瘾'       #纵捶鹏傻  啃钓猛舱苞腔gitlab管凑笛别秃
u.save!                #泼弊希缎
exit                   #摄法瞄拿裤
==========================================================
gitlab-ctl restart     #怯郭gitlab,病步镀莫魏顿估臊浴root 虹坷强如锄
相关推荐
胡仁总灌君.21 分钟前
MySQL集群技术
linux·运维·服务器·数据库·mysql·mha·mysql高可用集群
Felven2 小时前
麒麟信安系统下使用coredump调试应用程序
linux·运维·服务器·麒麟信安·coredump
jwensh5 小时前
【Linux】如何快速查看 linux 服务器有几个cpu
java·linux·服务器
shyuu_5 小时前
配置PXE预启动执行环境:使用PXE装机服务器网络引导装机
linux·运维·服务器·网络·云计算·运维开发
让开,我要吃人了9 小时前
HarmonyOS NEXT 实战开发:实现日常提醒应用
linux·前端·华为·移动开发·harmonyos·鸿蒙·鸿蒙系统
深情不及里子9 小时前
CI/CD之Jenkins用于Linux系统的部署方式汇总
linux·ci/cd·容器·kubernetes·jenkins
linuxMinx9 小时前
Linux~Docker容器入门学习
linux·运维·服务器·网络
驱动起爆大师x_x9 小时前
一文了解肖特基二极管、稳压二极管和TVS管
linux·笔记·学习·机器人·自动驾驶
星眺北海9 小时前
【后端】使用uWSGI部署django项目
linux·python·django·uwsgi
亭墨9 小时前
联影一面面经
linux·驱动开发·学习·面试