Gitlab 安装

1.安装ssh

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

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

sudo systemctl enable sshd

3.启动SSH服务,安装命令:

sudo systemctl start sshd

4。安装防火墙(如果已经安装了防火墙并且已经在运行状态,则可直接进行第6步)

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
sudo systemctl enable postfix
sudo systemctl start postfix

9.添加Gitlab包资源

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

10.执行Gitlab安装命令

sudo EXTERNAL_URL=“http://192.168.3.13:8081” yum install -y gitlab-ee

注意:EXTERNAL_URL设置的是本地IP和端口号,如果忘记修改,需要要主配置文件中修改,修改后通过gitlab-ctl reconfigure 命令生效

gitlab-ee通过国外网站下载,可能速度比较忙,可以多试几次。
下面是我挂云盘上面的地址,可以手工下载替换,避免下载
https://pan.baidu.com/s/1QdErGZQacwMamwnQMZloZg

11.登陆Gitlab系统,http://192.168.3.13:8081,首次修改密码

12.使用GitLab

常用目录目录说明
/etc/gitlab/gitlab.rb主配置文件
/var/log/gitlab/日志目录
/var/opt/gitlab/各个服务的主目录
/var/opt/gitlab/git-data/repositoriesGIT仓库数据目录

常用命令:gitlab-ctl stop|start|restart|
修改主配置文件后,可以通过 gitlab-ctl reconfigure

13.SSH设置

ssh-keygen -o -t rsa -b 4096 -C "email@example.com"
在这里插入图片描述
在这里插入图片描述
拷贝到gitlab中

在这里插入图片描述

参考:

https://about.gitlab.com/install/#centos-7
https://blog.csdn.net/duyusean/article/details/80011540

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值