#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至下載工具下載再上傳至服務器便可html
修改配置文件 /etc/gitlab/gitlab.rb 修改下面地址爲你hostname或ip git
注意 需添加 = shell
external_url = 'gitlab.xxx.com'
在/etc/gitlab/gitlab.rb 追加ldap配置 (詳細配置參數解釋詳見參考)centos
# 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完成ssh
ldap登錄報錯日誌位置 /var/log/gitlab/gitlab-rails/production.logcurl
gitlab服務啓動關閉及重啓ide
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.ymlgitlab
參考文檔: 安裝:https://about.gitlab.com/downloads/