CentOS7 安装 GitLab
GitLab是一个基于 Web 的 Git 仓库管理工具,且具有wiki 和 issue 跟踪功能
1、配置并安装依赖
yum -y update
yum -y install firewalld
yum -y install curl
2、在系统防火墙中打开 HTTP 和 SSH 访问
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
3、安装 Postfix 发送通知邮件
yum -y install postfix
systemctl enable postfix
systemctl start postfix
4、添加 GitLab 软件包
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | bash
5、安装 GitLab
- 将
http://gitlab.example.com
更改为想要访问您的 GitLab 的 URL ,域名、IP 都行
EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee
- 出现下图所示,安装成功
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab should be available at http://69.12.78.155
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
Verifying : gitlab-ee-10.6.3-ee.0.el7.x86_64 1/1
Installed:
gitlab-ee.x86_64 0:10.6.3-ee.0.el7
Complete!
6、初始化密码并登陆
第一次访问时,将被重定向到重置密码页面。需要为管理员帐户设置密码,使用默认帐户的用户名root
登录。
至此,GitLab 安装成功!