CentOS下GitLab的安装部署_centos 安装部署 gitlab

转载来源 :https://mp.weixin.qq.com/s/kUwZja0xK1IfqGU6R2f1EA

一 GitLab Server的搭建

参考:https://about.gitlab.com/install/

1.准备工作

以centos7为例,准备一台至少内存为4G的机器。
系统版本:CentOS Linux release 7.3.1611 (Core)
软件版本:Gitlab-ce-11.10.1
硬件要求:最低2核4GB,建议4核8GB

2.安装依赖软件

[root@localhost ~]# sudo yum install -y git vim gcc glibc-static telnet
[root@localhost ~]# sudo yum install -y curl policycoreutiels-python openssh-server
[root@localhost ~]# sudo systemctl enable sshd
[root@localhost ~]# sudo systemctl start sshd
[root@localhost ~]# sudo yum install postfix -y 
[root@localhost ~]# sudo systemctl enable postfix
[root@localhost ~]# sudo systemctl start postfix                                                => 启动SSH远程服务
[root@localhost ~]# systemctl stop firewalld                                              => 停止Firewalld防火墙服务
[root@localhost ~]# systemctl disable firewalld                                           => 禁用Firwalld防火墙服务开机自启
[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux => 关闭SeLinux(重启主机生效)
[root@localhost ~]# setenforce 0

3.设置gitlab安装源

国内的话就使用清华大学源,内容为:

[root@localhost ~]# vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
[root@localhost ~]# yum makecache

4、安装Gitlab

[root@localhost ~]# yum install -y gitlab-ce
可以访问"https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/"查看Gitlab-ce的版本。
安装历史版本请使用下面命令:
[root@localhost ~]# yum install 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值