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)

标签:GITCentos 发布于:2019-11-15 11:22:28