gitlab 安装及ldap集成 centos6.x

一、安装gitlab rpm包 及依赖
#curl -O https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-7.5.3_omnibus.5.2.1.ci-1.el6.x86_64.rpm
#yum install -y openssh-server postfix  cronie
#chkconfig postfix on
#rpm -i gitlab-7.5.3_omnibus.5.2.1.ci-1.el6.x86_64.rpm

其中第一步下载较慢 建议将地址copy至下载工具下载再上传至服务器即可

二、配置gitlap 并集成ldap

 修改配置文件 /etc/gitlab/gitlab.rb 修改下面地址为你hostname或ip 

  注意 需添加  = 

external_url = 'gitlab.xxx.com'

 在/etc/gitlab/gitlab.rb 追加ldap配置 (详细配置参数解释详见参考)

# For omnibus packages
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
  label: 'LDAP'
  host: 'ldap_server_IP'
  port: 389
  uid: 'uid'
  method: 'plain' # "tls" or "ssl" or "plain"
  allow_username_or_email_login: true
  bind_dn: 'cn=xxx,dc=xxx,dc=com'
  password: 'PASSWPRD'
  active_directory: false
  base: 'ou=xxx,dc=xxx,dc=com'
  user_filter: ''
EOS

使配置生效

#gitlab-ctl reconfigure

至此gitlab 安装集成ldap完成


三、调试及其他

ldap登陆报错日志位置 /var/log/gitlab/gitlab-rails/production.log

gitlab服务启动关闭及重启

gitlab-ctl start|stop|restart

需要注意的是修改过/etc/gitlab/gitlab.rb 后 需要执行 

#gitlab-ctl reconfigure

ps 这个命令会执行chef将/etc/gitlab/gitlab.rb添加的参数加入 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml


参考文档: 安装:https://about.gitlab.com/downloads/ 

               ldap配置:http://doc.gitlab.com/ce/integration/ldap.html 

转载于:https://my.oschina.net/firxiao/blog/357559

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值