首页 > 其他 > 详细

Centos7 安装部署gitlab-ce

时间:2020-06-17 11:08:08      阅读:81      评论:0      收藏:0      [点我收藏+]
部署社区版 gitlab
安装前准备:
内存:至少4G

1.安装依赖

检查依赖包是否安装
yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python

2.启动postfix,并设置为开机启动
systemctl start postfix
systemctl enable postfix

3.设置防火墙(可暂时关闭防火墙)
firewall-cmd --add-service=http --permanent
firewall-cmd --reload

关闭防火墙

systemctl stop firewalld

4.安装gitlab-ce(提供如下两种安装方式)
############### rpm包安装 ###############

获取gitlab rpm包 (清华镜像站) https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

找到对应版本
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.0.6-ce.0.el7.x86_64.rpm

安装rpm包

rpm -i gitlab-ce-13.0.6-ce.0.el7.x86_64.rpm

############### yum源安装 ###############

配置gitlab的yum源

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

更新本地yum缓存

yum makecache

安装 gitlab-ce

yum install -y gitlab-ce

5.修改配置 /etc/gitlab/gitlab.rb

vi /etc/gitlab/gitlab.rb
external_url ‘http://192.168.0.130:9000
unicorn[‘port‘] = 9001
unicorn[‘worker_processes‘] = 2

gitlab-ctl reconfigure
gitlab-ctl restart
重启服务

6.访问gitlab
http://192.168.0.130:9000

注:初次登陆,需要修改密码,至少8位字符

Centos7 安装部署gitlab-ce

原文:https://blog.51cto.com/bjdongpengfei/2505140

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!