Centos 快速安装Gitlab-ce

替换下载源

使用清华镜像站来加速rpm包下载
https://mirrors.tuna.tsinghua.edu.cn/help/gitlab-ce/

新建 /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

再执行

sudo yum makecache
sudo yum install gitlab-ce

部署成功输出


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


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

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

修改配置文件

安装部署后需要编辑文件修改gitlab IP配置

vim /etc/gitlab/gitlab.rb

找到external_url字段

external_url 'http://gitlab.example.com'
修改为
external_url 'http://服务器IP'

启动Gitlab-ce

执行gitlab-ctl reconfigure
posted @ 2020-09-07 09:46  iXiAo9  阅读(190)  评论(0编辑  收藏  举报