CentOS 7 下安装 Gitlub

1.安装并配置必要的依赖项

在CentOS 7(和RedHat / Oracle / Scientific Linux 7)上,以下命令还将在系统防火墙中打开HTTP和SSH访问。

sudo yum install -y curl policycoreutils-python openssh-server vim
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

接下来,安装Postfix以发送通知电子邮件。如果要使用其他解决方案发送电子邮件,请跳过此步骤并在安装GitLab后配置外部SMTP服务器。

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

在Postfix安装期间,可能会出现配置屏幕。选择“Internet Site”并按Enter键。使用服务器的外部DNS作为“邮件名称”,然后按Enter键。如果出现其他屏幕,请继续按Enter键接受默认值。

2.添加GitLab软件包存储库并安装软件包

添加GitLab包存储库。

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

接下来,安装GitLab包。将`http:// gitlab.example.com`更改为您要访问GitLab实例的URL。安装将自动配置并启动该URL的GitLab。 HTTPS在安装后需要其他配置。

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

若不使用域名直接使用IP即可:EXTERNAL_URL="http://10.69.2.140" yum install -y gitlab-ee

3.浏览到主机名并登录

首次访问时,您将被重定向到密码重置屏幕。提供初始管理员帐户的密码,您将被重定向回登录屏幕。使用默认帐户的用户名root 登录。

#配置并启动 GitLab   以下的这条命令很重要。

sudo gitlab-ctl reconfigure

4.第一次开打开http://10.69.2.140 得需要设置密码,然后使用root登陆。

另附上汉化教程:https://github.com/wangruidev/gitlab-setup-guide

gitlab-ctl stop
cd root
git clone https://gitlab.com/xhang/gitlab.git v11.2.3-zh
git checkout 11-2-stable-zh
git diff v11.2.3 v11.2.3-zh >/tmp/11.2.3-zh.diff
yum install patch -y
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/11.2.3-zh.diff
gitlab-ctl start

转自:https://www.evernote.com/shard/s696/sh/94524a09-ee28-476f-bb5c-07a336068147/503fe29915d8200b

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值