原文链接: http://www.kylin-ux.com/2017/04/17/project_management-gitlab安装配置

1. 安装配置依赖

1
2
3
4
5
sudo dnf install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

postfix[可选]:
官网描述:
If you install Postfix to send email please select ‘Internet Site’ during setup. Instead of using Postfix you can also use Sendmail or configure a custom SMTP server and configure it as an SMTP server.

1
2
3
sudo dnf install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

2. 下载安装包

清华镜像

1
curl -O https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/dnf/el7/gitlab-ce-9.0.5-ce.0.el7.x86_64.rpm

官网
浏览器打开页面https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/7/gitlab-ce-9.0.5-ce.0.el7.x86_64.rpm, 点击右上角[Download]按钮下载

3. 安装

1
rpm -ivh gitlab-ce-9.0.5-ce.0.el7.x86_64.rpm

4. 配置端口号

编辑/etc/gitlab/gitlab.rb文件, 修改以下参数

1
2
3
external_url 'http://localhost:8888'
unicorn['port'] = 8887
gitlab_workhorse['auth_backend'] = "http://localhost:8887"

5. 配置并启动GitLab

1
sudo gitlab-ctl reconfigure