您的位置:首页 > 运维架构 > Linux

CentOS搭建GitLab服务器

2014-11-15 19:01 393 查看
以下为CentOS7下安装GitLab7.4.3的全部流程

1、切换到root用户
su root
2、下载并安装GitLab
curl -O https://downloads-packages.s3.amazonaws.com/centos-7.0.1406/gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm sudo yum install openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo rpm -i gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm

第一条指令从GitLab官网下载安装包速度可能较慢,可以从以下备注地址下载

备选地址: 百度云盘
3、配置GitLab
sudo -e /etc/gitlab/gitlab.rb
v  (修改"externval_url"之后的域名,可以是本机IP或指向本机IP的域名)
esc → shift+: → wq
sudo gitlab-ctl reconfigure
4、配置防火墙
sudo firewall-cmd --permanent --add-service=http # open up the firewall for HTTP and SSH requests
sudo systemctl reload firewalld
5、访问GitLab
直接通过第3步配置的地址或域名访问GitLab。以下为GitLab默认的账户。
用户名:root
密 码:5iveL!fe
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: