Centos7下GitLab服务器的搭建

1、首先

 sudo yum update 

更新当前库

2、执行以下命令:

sudo yum install curl policycoreutils openssh-server openssh-clients -y 
sudo systemctl enable sshd 
sudo systemctl start sshd 
sudo yum install postfix  
sudo systemctl enable postfix 
sudo systemctl start postfix 
sudo firewall-cmd --permanent --add-service=http 
sudo systemctl reload firewalld 

其中 sudo yum install postfix 可能会报错,部分环境可能已经配置好此步,报错直接跳过。

3、添加gitlb官方地址至源文件

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

提示如下:

The repository is setup! You can now install packages.

即可以开始安装

执行安装:

sudo yum install gitlab-ce -y 

提示如下:

Installed:
  gitlab-ce.x86_64 0:9.4.2-ce.0.el7                                             

Complete!

即安装成功

4、执行配置脚本

sudo gitlab-ctl reconfigure

此步骤大概会执行3分钟左右,结果大概如下:

unning handlers:
Running handlers complete
Chef Client finished, 362/517 resources updated in 03 minutes 40 seconds
gitlab Reconfigured!

即可通过访问服务器地址访问,并进行初始化配置(默认为80端口,配置文件为:/etc/gitlab/gitlab.rb)

配置文件说明

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值