Gitlab在Ubuntu、Debian、CentOS 6、CentOS 7、OpenSUSE、Raspberry Pi2这些服务器上安装方法是不同的,我们首先来介绍Gitlab在CentOS7上的详细安装步骤:


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

如果你想使用 Postfix 发送邮件,请在安装过程中根据提示选择 'Internet Site'。 你也可以用 Sendmail 或者 配置一个自定义的 SMTP 服务 并 把它作为一个 SMTP 服务器。 

在 CentOS 系统上,下面的命令将会打开系统防火墙 HTTP 和 SSH 的访问。 

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

如果你不太习惯使用命令管道的方式安装镜像仓库,你可以在这里找到 完整的安装脚本 或者 选择系统对应的安装包 使用下面的命令手动安装。 

curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm rpm -i gitlab-ce-XXX.rpm <button aria-label="Copy to clipboard" class="btn copy-btn js-copy-btn" data-clipboard-text="" curl="" -ljo="" https:="" mirrors.tuna.tsinghua.edu.cn="" gitlab-ce="" yum="" el7="" gitlab-ce-xxx.rpm"="" data-placement="top" data-toggle="tooltip" title="" type="button" data-original-title="Copy to clipboard" style="color: rgb(107, 79, 187); font-family: inherit; font-size: 14px; font-style: inherit; font-variant-caps: inherit; line-height: 1.42857; margin: 5px; overflow: visible; cursor: pointer; vertical-align: middle; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; white-space: nowrap; padding: 5px; border-radius: 4px; user-select: none;">
3. 配置并启动 GitLab 
sudo gitlab-ctl reconfigure
4. 通过浏览器访问上一步配置的域名 

第一次访问 GitLab,系统会重定向 url 到重置密码的页面,你需要输入初始化管理员账号的密码。 设置完成后,系统会重定向到登录界面,你就可以使用刚才输入的密码登录系统了。

系统默认的管理员账号为 root, 登录系统后,你可以修改管理员账号为自己喜欢的账号。



详细安装参照:https://www.gitlab.com.cn/installation/#centos-7

故障排查:https://docs.gitlab.com.cn/omnibus/



Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐