centos8搭建 gitlab

准备工作

一台云服务器,最低配置为2gb内存,安装gitlab2gb是不够的,需要配置虚拟内存,虚拟内存设置为5gb即可

1.安装ssh

sudo yum install -y curl policycoreutils-python openssh-server

2.将SSH服务设置成开机自启动,安装命令:
sudo systemctl enable sshd

3.启动SSH服务,安装命令:sudo systemctl start sshd

4.安装防火墙 yum install firewalld systemd -y
5.开启防火墙:service firewalld  start
6.添加http服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效。

sudo firewall-cmd --permanent --add-service=http
7.重启防火墙:sudo systemctl reload firewalld

8.安装Postfix以发送通知邮件,安装命令:sudo yum install postfix
9.将postfix服务设置成开机自启动:sudo systemctl enable postfix
10.启动postfix:sudo systemctl start postfix
11.安装wget yum -y install wget
12.安装vim编辑器 安装命令:yum install vim -y
13.添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-13.11.1-ce.0.el8.x86_64.rpm

14.安装gitlab rpm -i gitlab-ce-13.11.1-ce.0.el8.x86_64.rpm

centos8搭建 gitlab
15.修改gitlab配置文件指定服务器ip和自定义端口:

vim  /etc/gitlab/gitlab.rb
加上第一句,修改第二句为你的服务器ip
centos8搭建 gitlab
16.重置并启动GitLab

gitlab-ctl reconfigure

gitlab-ctl restart

出现ok:run表示启动成功
centos8搭建 gitlab

17.创建public key
ssh-keygen
一直回车

centos8搭建 gitlab
18.复制id_rsa.pub公钥
cat ~/.ssh/id_rsa.pub

centos8搭建 gitlab

centos8搭建 gitlab

注意:第一次进入gitlab需要更改密码,此刻你随便改,改完退出也进不去的 所以赶紧去个人设置里面再去改密码,这时候,就可以用新改的密码登陆gitlab

centos8搭建 gitlab

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值