gitlab简单搭建教程

安装gitlab

关闭防火墙

安装依赖

shell 复制代码
yum -y install curl policycoreutils-python openssh-server perl 

配置邮件服务器

shell 复制代码
yum -y install postfix
systemctl enable postfix
systemctl start postfix

yum源

官方

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash 

国内镜像

shell 复制代码
vim /etc/yum.repos.d/gitlab-ce.repo 
conf 复制代码
//添加如下内容 
[gitlab-ce] 
name=Gitlab CE Repository 
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ 
gpgcheck=0 
enabled=1 

更行yum缓存

shell 复制代码
yum makecache fast 

安装

yum -y install gitlab-ce 

# 指定版本安装
yum -y install gitlab-ce-x.x.x 

rpm安装

cd /data/tools 
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.0.3-ce.0.el7.x86_64.rpm 
rpm -ivh gitlab-ce-14.0.3-ce.0.el7.x86_64.rpm

配置url

vim /etc/gitlab/gitlab.rb
shell 复制代码
external_ur=http://192.168.56.21:8085

加载配置

shell 复制代码
gitlab-ctl reconfigure 

①初始化默认管理员帐户的用户名为 root ,密码存储在

/etc/gitlab/initial_root_password 文件中,此文件将在 24 小时后的第一次重新配置运行中清除。

shell 复制代码
cat /etc/gitlab/initial_root_password

②若非必要不建议做第二次初始化,后续若有修改配置文件使用命令 gitlab-ctl restart 重启所有组件服务即可生效新的配置。

③先修改gitlab.rb文件中的"external_url"选项值,再使用"gitlab-ctl reconfigure"命令配置GitLab。就不需要在配置后修改 "

相关推荐
IT学长编程11 小时前
计算机毕业设计 基于SpringBoot的智慧社区管理系统的设计与实现 Java实战项目 附源码+文档+视频讲解
java·spring boot·后端·毕业设计·课程设计·论文笔记·1024程序员节
qq_382391333 天前
WPF框架学习
学习·wpf·1024程序员节
✿ ༺ ོIT技术༻10 天前
Linux:TCP和守护进程
linux·运维·服务器·网络·tcp/ip·1024程序员节
辅助东皇燕双鹰14 天前
行测知识()
1024程序员节
深蓝易网17 天前
探寻制造型企业MES管理系统:功能、架构与应用全解析
大数据·运维·人工智能·架构·制造·1024程序员节
Lenyiin22 天前
2848、与车相交的点
c++·算法·leetcode·1024程序员节
earthzhang20211 个月前
《深入浅出HTTPS》读书笔记(31):HTTPS和TLS/SSL
开发语言·网络·python·https·1024程序员节
不讲废话的小白1 个月前
怎么样把pdf转成图片模式(不能复制文字)
pdf·1024程序员节
明明真系叻1 个月前
2025.1.26机器学习笔记:C-RNN-GAN文献阅读
人工智能·笔记·深度学习·机器学习·生成对抗网络·1024程序员节
Joeysoda1 个月前
Java数据结构 (从0构建链表(LinkedList))
java·linux·开发语言·数据结构·windows·链表·1024程序员节