CentOS安装gitlab

xiaoxiao2021-02-28  97

最近在搞gitlab,一开始在ubuntu上安装的,那个过程简直是痛不欲生。可能是因为人品不好的缘故吧,中间出现了各种错误;一度几乎让我产生了放弃的念头,后来发现很多都是用的CentOS来安装gitlab。于是,抱着试一试的心情就又进行了一次尝试,没想到,出奇的顺利。现记下安装过程,以便以后查阅。

首先,过程主要是按照官方来的:https://about.gitlab.com/installation/

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

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

2.添加GitLab包服务器并安装包

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce 这个地方容易出现问题,可能是被墙的原因,https://packages.gitlab.com/gitlab/gitlab-ce  这是官方包的瞎子啊地址,各种包都有,选择匹配的下载即可。

也可以直接用以下命令:

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-XXX.rpm/download rpm -i gitlab-ce-XXX.rpm

3.配置并启动GitLab

sudo gitlab-ctl reconfigure

4.浏览到主机名并登录

在您第一次访问时,您将被重定向到密码重置屏幕,以提供初始管理员帐户的密码。输入您想要的密码,您将被重定向回登录屏幕。

默认帐户的用户名是root提供您之前创建的密码并登录。登录后,您可以更改用户名。

转载请注明原文地址: https://www.6miu.com/read-67347.html

最新回复(0)