在CentOS6.4上安装GitLab

1.Install and configure the necessary dependencies

On CentOS 6 (and RedHat/Oracle/Scientific Linux 6), the commands below will also open HTTP and SSH access in the system firewall.

sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh

注:如果出现“Another app is currently holding the yum lock; waiting for it to exit...”,执行“rm -f /var/run/yum.pid”把yum的进程杀掉就OK了

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

sudo yum install postfix
sudo service postfix start
sudo chkconfig postfix on

During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter.

If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

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

Next, install the GitLab package. Change `http://gitlab.example.com` to the URL at which you want to access your GitLab instance.

Installation will automatically configure and start GitLab at that URL. HTTPS requires additional configuration after installation.

sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce

 You can use GitLab instance URL like this:

sudo EXTERNAL_URL="https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7" yum -y install gitlab-ce

猜你喜欢

转载自www.cnblogs.com/janson071/p/10070972.html