1.Gitlabをダウンロードします
- ダウンロードリンク:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
- ここで
gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
例を見てください;
2.インストール
でCentOS7にアップロードされたgitlabインストールパッケージ/opt
を使用して、install.sh
次のように新しいドキュメントを作成します。
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