Git (6): Build a Gitlab server under CentOS7

1. Download Gitlab

  • Download link: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
  • Take gitlab-ce-10.8.2-ce.0.el7.x86_64.rpman example here ;

2. Installation

The gitlab installation package uploaded to the CentOS7 /optin, and create a new install.shdocument, as follows:

sudo rpm -ivh /opt/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
sudo yum install postfix
sudo service postfix start
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce
#设置权限
chmod 755 install.sh

#执行install.sh文件
cd /opt
./install.sh

#重启linux
reboot

#初始化gitlab配置
gitlab-ctl reconfigure

#启动gitlab服务
gitlab-ctl start

#停止gitlab服务
gitlab-ctl stop

Guess you like

Origin blog.csdn.net/houwanle/article/details/112721744