CentOS安装GitLab

安装GitLab社区版教程
本文详细介绍如何在Linux系统上安装GitLab社区版,包括设置防火墙规则、安装必要的依赖软件包、添加GitLab软件包存储库、安装GitLab软件包、配置GitLab并启动服务等步骤。

安装GitLab社区版

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
在系统防火墙中打开HTTP和SSH访问

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
安装Postfix发送通知邮件

curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
添加GitLab软件包存储库

sudo yum install gitlab-ce
安装GitLab软件包
按Y确认

等待一会儿

vim /etc/gitlab/gitlab.rb
修改GitLab配置文件

修改第13行
external_url 'http://localhost:8787'

修改第612行
取消注释#

修改第613行
unicorn['port'] = 9797

firewall-cmd --zone=public --permanent --add-port=8787/tcp
firewall-cmd --zone=public --permanent --add-port=9797/tcp
firewall-cmd --reload
开放防火墙8787、9797端口

sudo gitlab-ctl reconfigure
启动GitLab

等待一会儿

sudo gitlab-ctl restart
重启GitLab

访问
http://192.168.1.6:8787/

首次访问会要求你重置密码并确认
改为Abcdef@123456

重新登录
用户名:root
密码:Abcdef@123456

 

 

转载于:https://www.cnblogs.com/yjlch1016/p/8996124.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值