Ubuntu18.04上安装GitLab

GitLab用于版本控制非常的方便,这里介绍下在Ubuntu18.04上的安装。

首先,Ubuntu18.04的默认镜像源非常的慢,将镜像源设置为国内镜像源可以免去安装GitLab时漫长的等待。修改镜像源可以参考笔记【4、修改apt仓库源为阿里云】做下配置。

安装GitLab的步骤如下:

一、安装依赖

sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates

二、安装发送邮件的依赖

安装过程中选择默认设置即可,在需要输入文字的地方输入邮件发送者信息。

sudo apt-get install -y postfix

三、下载安装脚本

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

这个安装脚本将要访问"https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/",该地址我安装的时候存在问题,可以这两行修改下,修改后的内容如下:

$ more /etc/apt/sources.list.d/gitlab_gitlab-ce.list
# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/gitlab/gitlab-ce

#deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main
#deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main

deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu bionic main
deb-src https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu bionic main

然后更新下
sudo apt-get update

四、安装GitLab

sudo EXTERNAL_URL="http://ip或域名" apt-get install gitlab-ce
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值