ubuntu18.04下安装gitlab

1.安装并配置必要的依赖关系

sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates


接下来,安装Postfix发送通知邮件。如果您想使用其他解决方案发送电子邮件,请跳过此步骤并在安装GitLab后配置外部SMTP服务器。

sudo apt-get install -y postfix


在Postfix安装期间,可能会出现一个配置屏幕。选择“Internet站点”并按回车。使用您的服务器的外部DNS作为'邮件名'并按回车。如果出现其他屏幕,请继续按回车键以接受默认值。
2.添加GitLab软件包存储库并安装软件包
添加GitLab软件包存储库。

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash


接下来,安装GitLab软件包。将`http:// gitlab.steven.com`更改为您想要访问您的GitLab实例的URL。安装将自动在该URL处配置并启动GitLab。安装后HTTPS需要额外的配置。

sudo EXTERNAL_URL="http://gitlab.steven.com" apt-get install gitlab-ee


安装完成会出现如下提示:

Running handlers complete
Chef Client finished, 425/633 resources updated in 09 minutes 19 seconds
gitlab Reconfigured!

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
 


     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/
 

Thank you for installing GitLab!
GitLab should be available at http://gitlab.steven.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


3.浏览到主机名并登录
第一次访问时,您将被重定向到密码重置屏幕。提供初始管理员帐户的密码,您将被重定向回登录屏幕。使用默认帐户的用户名root登录。
有关安装和配置的详细说明,请参阅我们的文档。

4.修改IP、PORT

sudo vi /etc/gitlab/gitlab.rb

    external_url 'https://192.168.3.9'

    unicorn['port'] = 8081
sudo gitlab-ctl reconfigure

猜你喜欢

转载自www.cnblogs.com/xiaojf/p/11113363.html