DevOps工具链(一)——GitLab安装

本文软件安装版本
OS: viritualBox CentOS 7.4虚机
GitLab: gitlab-ee-10.6.2-ee.0.el7.x86_64
用户:root用户

1.gitlab官方网站

https://about.gitlab.com/installation/#centos-7

2. 先更新源

#先更新yum 源,这里安装的是阿里的源
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back
#获取最新源
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#更新
[root@localhost ~]# yum update

3.安装前的配置

[root@localhost ~]# yum install -y curl policycoreutils-python openssh-server
[root@localhost ~]# systemctl enable sshd
[root@localhost ~]# systemctl start sshd
[root@localhost ~]# firewall-cmd --permanent --add-service=http
[root@localhost ~]# systemctl reload firewalld

4.安装gitlab

# add the gitlab package repository
[root@localhost ~]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

# EXTERNAL_URL="http://192.168.1.100:8088" 这里写你的IP和port
[root@localhost ~]# EXTERNAL_URL="http://192.168.1.100:8088" yum install -y gitlab-ee

如果非常慢,可以用迅雷等下载gitlab的安装包,然后通过sftp的方式传到服务器上安装。
迅雷下载的地址:gitlab10.6.2 rpm包地址
gitlab下载地址:包下载地址

#切换到sftp上传的包目录
[root@localhost ~]# cd /home
[root@localhost ~]# ls
    gitlab-ee-10.6.2-ee.0.el7.x86_64.rpm
[root@localhost ~]# EXTERNAL_URL="http://192.168.1.100:8088" rpm -i gitlab-ee-10.6.2-ee.0.el7.x86_64.rpm

这个安装的过程好像很慢,我2G内存的情况下,在gitlab-ee安装完成后,卡那了。
过了一大会,查看/opt目录下有了gitlab的目录,在/etc目录下也有了gitlab的目录。
网页访问http://192.168.1.100:8088也返回被拒绝,查看官网要求是4G内存最低,所以关闭虚机,内存调整为4G在启动起操作系统来看,发现可以访问http://192.168.1.100:8088了,直接重定向到了第一次登录时,让重置root密码。

  • 重置root密码页面
    这里写图片描述

  • 设定root密码后跳转到登录页
    这里写图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值