沃梦达 / 编程技术 / 服务器 / 正文

CentOs下搭建GitLab

1、安装并配置必要的依赖项yum install -y curl policycoreutils-python openssh-server #安装py,ssh依赖项systemctl enable sshd #设置sshd开机启动systemc...

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

yum install -y curl policycoreutils-python openssh-server   #安装py,ssh依赖项
systemctl enable sshd                        #设置sshd开机启动

systemctl start sshd                         #启动sshd服务
firewall-cmd --permanent --add-service=http           #对外暴露http服务
#(如果提示firewallD is not running,则通过命令查看防火墙是否已经关闭:systemctl status firewalld)
#(如果状态是dead,则重启防火墙:systemctl start firewalld)
systemctl reload firewalld                     #重新载入firewalld

2、添加GitLab软件包并安装软件包

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash  #下载软件包
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee  #安装软件包,将http://gitlab.example.com改成你的访问地址

3、访问

  首次访问时,将被重定向到密码重置界面。默认帐户的用户名root。

备注:

  • 系统内存如果太小,访问gitlab会502,所以要么升级系统硬件,要么修改一下./etc/gitlab/gitlab.rb中的配置。
  • postfix邮箱系统看个人需求安装。
  • 官方文档:https://about.gitlab.com/installation/

本文标题为:CentOs下搭建GitLab

基础教程推荐