centos 6.4/redhat 6.4 安装gitlab

一,把所有包升级到最新版本

yum -y upgrade

 

二,安装最新版ruby 2.1.5 

步骤http://my.oschina.net/duolus/blog/348353

 

三,安装官方给出的omnibus软件包(下面是官方给出的安装步骤,安装之)

curl -O https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-7.5.1_omnibus.5.2.0.ci-1.el6.x86_64.rpm
sudo yum install openssh-server
sudo yum install postfix
sudo yum install cronie
sudo service postfix start sudo chkconfig postfix on sudo rpm -i gitlab-7.5.1_omnibus.5.2.0.ci-1.el6.x86_64.rpm

 

四,重置配置和启动 GitLab

sudo gitlab-ctl reconfigure
sudo lokkit -s http -s ssh

 

五,浏览器输入服务器ip登录
Username: root 
Password: 5iveL!fe

 

===========================

 

可能遇到的问题  (不定期更新)

 

  1. gitlab-ctl reconfigure 报错解决方法

[root@websvr01 ~]# sudo gitlab-ctl reconfigure
Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: gitlab::default
  * directory[/etc/gitlab] action create (up to date)
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb
================================================================================
RuntimeError
------------
External URL must include a FQDN
Cookbook Trace:
---------------
  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:109:in `parse_external_url'   /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:260:in `generate_config'   /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file' Relevant File Content: ---------------------- /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb: 102:   103:      def parse_external_url 104:        return unless external_url 105:   106:        uri = URI(external_url.to_s) 107:   108:        unless uri.host 109>>         raise "External URL must include a FQDN" 110:        end 111:        Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}" 112:        Gitlab['gitlab_rails']['gitlab_host'] = uri.host 113:        Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}" 114:   115:        case uri.scheme 116:        when "http" 117:          Gitlab['gitlab_rails']['gitlab_https'] = false 118:        when "https" Running handlers: [2014-11-25T11:10:44+08:00] ERROR: Running exception handlers Running handlers complete [2014-11-25T11:10:44+08:00] ERROR: Exception handlers complete [2014-11-25T11:10:44+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 7.716937465 seconds [2014-11-25T11:10:44+08:00] ERROR: External URL must include a FQDN [2014-11-25T11:10:45+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

解决方法:

是因为/etc/gitlab/gitlab.rb文件中的内容是:

external_url 'hostname'

将其修改为:

external_url='hostname'

即可,只需要在原来的配置项中添加个 ‘=’ 即可,为了避免域名引起的问题,也可以直接配置ip,如下所示:

external_url='192.168.1.49'。

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值