gitlab需要占用80 8080口记得避免端口冲突。
1.安装并配置必要的依赖项与防火墙开启http https访问;
sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
安装Postfix以发送通知电子邮件。
sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix
2.添加GitLab软件包存储库并安装软件包
添加GitLab包存储库。
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
接下来,安装GitLab包。将`http:// gitlab.example.com`更改为您要访问GitLab实例的URL。安装将自动配置并启动该URL的GitLab。HTTPS 在安装后需要其他配置。
sudo EXTERNAL_URL =“http://gitlab.example.com”yum install -y gitlab-ee
3.初始化gitlab配置
sudo gitlab-ctl reconfigure
4.浏览到主机名并登录
http://192.168.3.6 在第一次访问时,您将被重定向到密码重置屏幕。提供初始管理员帐户的密码,您将被重定向回登录屏幕。使用默认帐户的用户名root
登录。