zoukankan      html  css  js  c++  java
  • 安装gitlab ce

    切换到root用户,安装相关依赖

    yum install curl policycoreutils openssh-server openssh-clients
    service sshd restart
    yum install postfix
    service postfix restart
    

      

    添加yum源

    vim /etc/yum.repos.d/gitlab-ce.repo
    [gitlab-ce]
    name=Gitlab CE Repository
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
    gpgcheck=0
    enabled=1
    

      

    安装gitlab-ce:

    yum makecache
    yum install gitlab-ce
    

      

    修改配置文件:

    vim /etc/gitlab/gitlab.rb 
    external_url 'http://IP:port'
    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: 'xxx.xxx.com'                                                                                                            
        port: 389                                                                                                                              
        uid: 'sAMAccountName'                                                                                                                  
        method: 'plain' # "tls" or "ssl" or "plain"                                                                                            
        bind_dn: 'CN=admin,OU=Public Account,OU=Special OU,OU=xxx,DC=xxx,DC=com'                                               
        password: '****'                                                                                                                   
        active_directory: true                                                                                                                 
        allow_username_or_email_login: false                                                                                                   
        block_auto_created_users: false                                                                                                        
        base: 'DC=xxx,DC=com'                                                                                                                
        user_filter: ''                                                                                                                        
    EOS
    

      

    更改配置文件后,重新加载使改动配置生效,并启动gitlab:

    gitlab-ctl reconfigure 
    gitlab-ctl start
    

      

    常用命令:

    gitlab-ctl status # 查看服务状态
    gitlab-ctl tail  --查看所有日志
    gitlab-ctl tail nginx/gitlab_access.log
    --查看nginx访问日志
    gitlab-ctl tail unicorn --跟踪unicorn的状态
    
    主配置文件:/etc/gitlab/gitlab.rb // 可以自定义一些邮件服务等 
    日志地址:/var/log/gitlab/ // 对应各服务的打印日志 
    服务地址:/var/opt/gitlab/ // 对应各服务的主目录 
    仓库地址:/var/opt/gitlab/git-data // 记录项目仓库等提交信息 
    重置配置:gitlab-ctl reconfigure // 不要乱用,会重置为最原始的配置的 
    重启服务:gitlab-ctl stop/start/restart/uninstall  // 停止、启动、重启、卸载 
    默认安装:postgres、nginx、redis、unicorn
    

      

      

      

  • 相关阅读:
    web.config中配置字符串中特殊字符的处理
    开源网络蜘蛛(Spider) 大全
    漂浮层广告代码[层为隐藏,点击广告后层消失][24小时/次]
    用asp.net和xml做的新闻更新系统
    网页采集时,常用的几种正则表达式
    C# Check is No number
    随机显示 ** 条记录的SQL语句
    如何在Asp.net中使用HtmlArea编辑器
    精通ASP.NET中弹出窗口技术
    设计模式学习笔记简单工厂模式
  • 原文地址:https://www.cnblogs.com/cjsblogs/p/8716932.html
Copyright © 2011-2022 走看看