1.Install and configure the necessary dependencies

On CentOS 6 (and RedHat/Oracle/Scientific Linux 6), the commands below will also open HTTP and SSH access in the system firewall.

  1. sudo yum install -y curl policycoreutils-python openssh-server cronie
  2. sudo lokkit -s http -s ssh

注:如果出现“Another app is currently holding the yum lock; waiting for it to exit...”,执行“rm -f /var/run/yum.pid”把yum的进程杀掉就OK了

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

  1. sudo yum install postfix
  2. sudo service postfix start
  3. sudo chkconfig postfix on

During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter.

If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

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

Next, install the GitLab package. Change `http://gitlab.example.com` to the URL at which you want to access your GitLab instance.

Installation will automatically configure and start GitLab at that URL. HTTPS requires additional configuration after installation.

  1. sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce

You can use GitLab instance URL like this:

  1. sudo EXTERNAL_URL="https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6" yum -y install gitlab-ce

有时会提示无法在线安装,出现error,让Trying other mirror...

只能选择自动下载rpm包,手动安装了:可以到 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/ 下载

下载完成后,放到centos系统的某目录下,切换到该目录,执行:

  1. rpm -ivh gitlab-ce-11.5.1-ce.0.el6.x86_64.rpm

出现以上信息,表示GitLab安装成功啦!

 3. 安装成功后配置

首先就是端口占用问题,gitlab 启动会使用 80 端口,所以建议你在启动 gitlab 前先将不需要的服务都关掉,或者修改默认端口:

  1. sudo vim /etc/gitlab/gitlab.rb

修改external_url

保存修改后,执行:

  1. sudo gitlab-ctl reconfigure

过程可能比较长,请耐心等待...

4.启动gitlab服务

  1. gitlab-ctl start

出现问题:

解决办法:查看防火墙状态,把防火墙关闭:

重启服务,再次访问:出现 502的错误...

除了 80 这个端口外,还有一个unicorn用的端口,默认是8080,如果8080端口被其他程序占用。

那么unicorn就会无法启动,显示为502错误,”GitLab is not responding”。

解决办法:修改 /etc/gitlab/gitlab.rb,增加以下内容:

  1. unicorn['port'] = 8883

保存修改后,执行gitlab-ctl reconfigure,再重启gitlab服务即可。

上面需要设置密码,对应的用户名是root

设置成功后,登录,进入登录成功页面:

在CentOS6.4上安装GitLab的更多相关文章

  1. 最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi

    最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi 使用Jexus5.8.1独立版 http://www.linuxdot.net/ ps:该“独立版”支持64位的CentOS ...

  2. 在CentOS7.1上安装Gitlab碰到的问题及解决方法

    一 前言 关于在CentOS7上安装Gitlab, 官方文档已经很详细了,步骤大家按照官方的安装文档一步一步安装即可, 这里就不在累述.官方安装文档地址:  https://about.gitlab. ...

  3. 在CentOS6的上安装Windows2012R2的KVM虚拟机

    在CentOS6的上安装Windows2012R2的KVM虚拟机 1:上传cn_windows_server_2012_r2_vl_with_update_x64_dvd_6052729.iso下载驱 ...

  4. CentOS6.7上安装Mysql5.7

    CentOS6.7上安装Mysql5.7 2017年07月22日 18:27:05 阅读数:564 环境的配置总是令人作呕,所以这次表明版本条件: 首先,这是一台新机器 其次,CentOS版本如下: ...

  5. git学习------>在CenterOS系统上安装GitLab并自定义域名访问GitLab管理页面

    目前就职的公司一直使用SVN作为版本管理,现在打算尝试从SVN迁移到Git.安排我来预言并搭建好相关的环境以及自己尝试使用Git.今天我就尝试在Center OS系统上安装GitLab,现在在此记录一 ...

  6. CentOS6.7上安装nginx1.8.0

    主题: CentOS6.7上安装nginx1.8.0 环境准备: 1.gcc-c++ 示例:yum install gcc-c++ 安装:gcc-c++ gcc-c++编译工具 2.PCRE(Perl ...

  7. centos6.5上安装5.7版本的mysql

    centos6.5上安装5.7版本的mysql https://www.cnblogs.com/lzj0218/p/5724446.html 设置root可以在本机以外的机器访问 mysql -uro ...

  8. 3.在 Kubernetes 上安装 Gitlab CI Runner

    结合文章:1. 在 Kubernetes 上安装 Gitlab ,地址:https://www.cnblogs.com/sanduzxcvbnm/p/13852854.html 总结: 结合开头的文章 ...

  9. 在linux(CentOS-6.7_x86_64)上安装mysql成功记录

    查看linux服务器的yum源设置: [root@hadoop03 yum.repos.d]# cd /etc/yum.repos.d [root@hadoop03 yum.repos.d]# ll ...

随机推荐

  1. bzoj 3677: [Apio2014]连珠线【树形dp】

    参考:http://www.cnblogs.com/mmlz/p/4456547.html 枚举根,然后做树形dp,设f[i][1]为i是蓝线中点(蓝线一定是父子孙三代),f[i][0]为不是,转移很 ...

  2. bzoj 3676: [Apio2014]回文串【后缀自动机+manacher】

    用manacher找出本质不同的回文子串放在SAM上跑 #include<iostream> #include<cstdio> #include<cstring> ...

  3. bzoj 2111: [ZJOI2010]Perm 排列计数【树形dp+lucas】

    是我想复杂了 首先发现大于关系构成了一棵二叉树的结构,于是树形dp 设f[i]为i点的方案数,si[i]为i点的子树大小,递推式是\( f[i]=f[i*2]*f[i*2+1]*C_{si[i]-1} ...

  4. 洛谷 P3356 火星探险问题 【最大费用最大流】

    输出方案好麻烦啊 拆点,石头的连(i,i',1,1)(i,i',inf,0)表示可以取一次价值1,空地直接连(i,i',inf,0),对于能走到的两个格子(不包括障碍),连接(i',j,inf,0), ...

  5. UVA - 10859 Placing Lampposts 放置街灯

    Placing Lampposts 传送门:https://vjudge.net/problem/UVA-10859 题目大意:给你一片森林,要求你在一些节点上放上灯,一个点放灯能照亮与之相连的所有的 ...

  6. qr.update导致的java.lang.NullPointerException空指针异常

    debug以后代码走到了qr.update这一步,再向下走一步就会报错了,内容是java.lang.NullPointerException 最后再三检查发现是SQL语句写错了!,我写的是插入语句是I ...

  7. [转]POJ WA/RE指南

    "POJ上头的题都是数学题",也不知道是那个家伙胡诌的--但是POJ的要求就是算法通过了也不让你AC.下面本人就这560题的经验,浅谈一下WA/RE了怎么办.  以下内容是扯淡-- ...

  8. clock()函数的返回值精度问题

    clock()函数返回值为1毫秒,就是0.001秒.clock函数功 能: 返回处理器调用某个进程或函数所花费的时间.用 法: clock_t clock(void);说明:clock_t其实就是lo ...

  9. 题解报告:hdu 1087 Super Jumping! Jumping! Jumping!

    Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very ...

  10. Latex排版工具的使用(一) 分类: Latex 2014-06-14 22:52 448人阅读 评论(0) 收藏

    使用Latex可以排版出漂亮的论文,尤其适合对含有数学公式论文的排版. 下面编写第一Latex源文件,实现对两个数学公式的排版: 新建文件first.tex: \documentclass{artic ...