美文网首页
UBUNTU18安装GITLAB

UBUNTU18安装GITLAB

作者: 致维东明 | 来源:发表于2019-07-27 19:18 被阅读0次

    GITLAB有两种安装方法:

    1. 编译安装,可定制性强(数据库和服务器可选择MYSQL和APACHE)
    2. 通过DEB包安装(数据库默认采用POSTGRESQL,服务器默认采用NGINX)

    安装步骤

    1. 安装依赖
    sudo apt-get update
    sudo apt-get install -y curl openssh-server ca-certificates
    
    1. 安装POSTFIX(这个是用来发送通知邮件的)

    也可以先不安装,等配置完成后再配置外部SMTP服务器

    sudo apt-get install -y postfix
    

    安装过程中会提示选择网络站点和邮件名(一般使用服务器的外部DNS)。我这里使用: gitlab.xiem.com

    如果使用POSTFIX发送邮件则选择INTERNET SITE(或者可以使用SENDMAIL和配置通用SMTP服务器)


    微信截图_20190727111924.png
    微信截图_20190727112001.png
    1. 安装软件包并执行安装
    curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
    sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install gitlab-ee
    或直接下载安装包并执行如下名
    dpkg -i gitlab-ce-XXX.deb
    

    需要指定配置URL(HTTPS配置易出错),如果不指定则可以通过第4步修改配置文件来设置。

    安装成功则提示如下信息:

    ...
    Running handlers:
    Running handlers complete
    Chef Client finished, 511/1358 resources updated in 05 minutes 23 seconds
    gitlab Reconfigured!
    
           *.                  *.
          ***                 ***
         *****               *****
        .******             *******
        ********            ********
       ,,,,,,,,,***********,,,,,,,,,
      ,,,,,,,,,,,*********,,,,,,,,,,,
      .,,,,,,,,,,,*******,,,,,,,,,,,,
          ,,,,,,,,,*****,,,,,,,,,.
             ,,,,,,,****,,,,,,
                .,,,***,,,,
                    ,*,.
         _______ __  __          __
        / ____(_) /_/ /   ____ _/ /_
       / / __/ / __/ /   / __ `/ __ \
      / /_/ / / /_/ /___/ /_/ / /_/ /
      \____/_/\__/_____/\__,_/_.___/
     
    Thank you for installing GitLab!
    GitLab should be available at http://gitlab.xiem.com
    
    For a comprehensive list of configuration options please see the Omnibus GitLab readme
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
    
    1. 配置和启动GITLAB
      打开配置文件: /etc/gitlab/gitlab.rb
      做如下修改:
      external_url = 'http://git.example.com' 修改为自己的IP地址: http://xxx.xx.xxx.xx
      sudo gitlab-ctl reconfigure 对GITLAB进行编译
      默认账户: root
    2. 登陆页面并重置密码

    如果无法访问请确保如下几件事:
    1). 80端是否被别的服务占用(特别是APACHE2)
    2). 确定NGINX正常启动了
    3). 执行重配置命令: sudo gitlab-ctl restart
    4). 检查是否安装好并且已经正确运行: sudo gitlab-ctl status

    微信截图_20190727185232.png
    1. 创建新用户
      先用管理员创建新用户之后通过编辑界面设置密码

    相关文章

      网友评论

          本文标题:UBUNTU18安装GITLAB

          本文链接:https://www.haomeiwen.com/subject/kgierctx.html