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。就不需要在配置后修改 "

相关推荐
西幻凌云2 天前
初始——正则表达式
c++·正则表达式·1024程序员节
启芯硬件2 天前
电源XL6009E1的dieshot细节分析-芯片设计干货
大数据·经验分享·硬件工程·1024程序员节
一颗青果4 天前
单例模式 | 死锁
linux·服务器·单例模式·1024程序员节
yBmZlQzJ6 天前
财运到内网穿透域名解析技术机制与中立评估
运维·经验分享·docker·容器·1024程序员节
yBmZlQzJ6 天前
内网穿透工具通过端口转发实现内外网通信
运维·经验分享·docker·容器·1024程序员节
数据皮皮侠AI7 天前
数字经济政策工具变量数据(2008-2023)
大数据·数据库·人工智能·笔记·1024程序员节
网安_秋刀鱼8 天前
【java安全】shiro反序列化1(shiro550)
java·开发语言·安全·web安全·网络安全·1024程序员节
unable code10 天前
攻防世界-Misc-Wire1
网络安全·ctf·misc·1024程序员节
开开心心就好10 天前
版本转换工具,支持Win双系统零售批量版
linux·运维·服务器·pdf·散列表·零售·1024程序员节