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

相关推荐
开开心心就好4 天前
开源免费高速看图工具,支持漫画大图秒开
linux·运维·服务器·安全·ruby·symfony·1024程序员节
unable code7 天前
磁盘取证-Flying_High
网络安全·ctf·misc·1024程序员节·磁盘取证
unable code8 天前
磁盘取证-ColorfulDisk
网络安全·ctf·misc·1024程序员节·内存取证
unable code9 天前
磁盘取证-[第十章][10.1.2 磁盘取证方法]磁盘取证1
网络安全·ctf·misc·1024程序员节·内存取证
开开心心就好10 天前
免费抽奖工具支持批量导入+自定义主题
linux·运维·服务器·macos·pdf·phpstorm·1024程序员节
开开心心就好14 天前
卸载工具清理残留,检测垃圾颜色标识状态
linux·运维·服务器·python·安全·tornado·1024程序员节
子燕若水15 天前
Facebook reels 运营指南
1024程序员节
尘觉18 天前
创作 1024 天|把热爱写成长期主义
数据库·1024程序员节
写点什么呢19 天前
Word使用记录
word·1024程序员节
开开心心就好19 天前
内存清理工具点击清理,自动间隔自启
linux·运维·服务器·安全·硬件架构·材料工程·1024程序员节