在 linux 下搭建 git & gitlab

在 linux 下搭建 git & gitlab, 傻瓜式安装步骤,没有出错

  1. 下载 git 环境
yum install -y git
  1. 创建 git 用户, 管理 git 用户
useradd git

passwd git
  1. 安装 ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server
  1. 将SSH服务设置成开机自启动
sudo systemctl enable sshd
  1. 启动SSH服务
sudo systemctl start sshd
  1. 安装防火墙 (可以忽略)
yum install firewalld systemd -y
  1. 开启防火墙,安装命令
service firewalld  start
  1. 添加http服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效
sudo firewall-cmd --permanent --add-service=http
  1. 重启防火墙
sudo systemctl reload firewalld
  1. 安装Postfix以发送通知邮件
sudo yum install postfix
  1. 将postfix服务设置成开机自启动
sudo systemctl enable postfix
  1. 启动postfix
sudo systemctl start postfix
  1. 进行下载 gitlab
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.3.3-ce.0.el7.x86_64.rpm
  1. 进行解压
rpm -i gitlab-ce-11.3.3-ce.0.el7.x86_64.rpm
解压过程可能会出现
rpm -i gitlab-ce-11.0.3-ce.0.el7.x86_64.rpm
如下报错:

警告:gitlab-ce-11.0.3-ce.0.el7.x86_64.rpm:V4 RSA/SHA1 Signature, 密钥 ID f27eab47: NOKEY
错误:依赖检测失败:
policycoreutils-python 被 

gitlab-ce-11.0.3-ce.0.el7.x86_64 需要
[root@izbp191siji73ir3cjd0faz tools]# yum install 

policycoreutils-python


执行: yum install policycoreutils-python

再次安装: rpm -i gitlab-ce-11.0.3-ce.0.el7.x86_64.rpm

在这里插入图片描述
15. 修改gitlab配置文件指定服务器ip和自定义端口

vim  /etc/gitlab/gitlab.rb		//	http:// "ip地址":"端口号"
稍后在浏览器访问这个就可以
  1. 重置并启动 gitlab
gitlab-ctl reconfigure		// 这个过程比较慢

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值