gitlab安装

1.安装gitlab yum源,为一会儿yum install 做准备

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

2.安装gitlab:

sudo EXTERNAL_URL="http://gitlab.zipeiyi.corp" yum install -y gitlab-ce

3.安装完成之后有提示:


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


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

Thank you for installing GitLab!
GitLab should be available at http://gitlab.zipeiyi.corp

注意:这里提示我使用http://gitlab.zipeiyi.corp这个域名访问,但是现在我还没有做好域名映射,所以先修改为通过使用ip访问
修改方式见文章后方

4.寻找安装位置

rpm -ql gitlab-ce
发现安装目录在/opt/gitlab 

5.修改访问url

1.配置文件位置
cd /opt/gitlab/embedded/service/gitlab-rails/config
vim gitlab.yml

2.在这个文本内搜索你的访问url,之前安装的时候我们设定的是http://gitlab.zipeiyi.corp

修改前

  ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: gitlab.zipeiyi.corp
    port: 80
    https: false

修改后

  ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: 10.1.13.1
    port: 80
    https: false

6.访问gitlab 界面:

http://10.1.13.1

登录界面

图片.png
gitlab登录界面

7. gitlab 重启

# Start all GitLab components
sudo gitlab-ctl start

# Stop all GitLab components
sudo gitlab-ctl stop

# Restart all GitLab components
sudo gitlab-ctl restart 
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容