> 文档中心 > Alibaba Cloud Linux 3.2104 LTS 64位 安装 gitlab

Alibaba Cloud Linux 3.2104 LTS 64位 安装 gitlab

博主之前使用的Liunx系统是Centos8,由于Centos8停止维护了,于是乎将Centos8换成了 Alibaba Cloud Linux 3.2104 LTS 64位然后整台服务器应用全部释放重新搞。。

在这里插入图片描述

第一步:下载gitlab(请使用清华镜像源)

wget  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.9.1-ce.0.el8.x86_64.rpm

第二步 vim/etc/yum.repos.d/gitlab-ce.repo (gitlab-ce 社区版 更具具体版本打开) 保存并退出
灵感来源于:Alibaba Cloud Linux 安装其他软件下载失败

[gitlab-ce]name=Gitlab CE Repositorybaseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gpgcheck=0enabled=1

第三步 安装gitlab所需依赖

yum install policycoreutils-python-utils

第四步 启动ssh并设置为开机自启动

systemctl enable sshdsystemctl start sshd

第五步 添加http服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效

systemctl start firewalldfirewall-cmd --permanent --add-service=httpsystemctl reload firewalld

第六步 启动postfix

systemctl enable postfixsystemctl start postfix

第七步回到 wget下载gitlab目录安装

rpm -ivh gitlab-ce-14.9.1-ce.0.el8.x86_64.rpm  

在这里插入图片描述

第八步 编辑ip和端口 vim /etc/gitlab/gitlab.rb

gitlab-ctl reconfiguregitlab-ctl restart

第九步 访问gitlab ip+端口 请注意端口放行避免在开启防火墙情况下无法访问

firewall-cmd --add-port=端口/tcp --permanent

如果访问出现502,解决方案

gitlab命令

重新配置并启动gitlab-ctl reconfiguregitlab-ctl restart开启:gitlab-ctl start关闭:gitlab-ctl stop

OK结束