gitlab配置实例

安装相关的依赖

[root@git-server ~]# yum -y install postfix curl policycoreutils-python openssh-server

上传gitlab包
安装包可自行到官网下载 http://gitlab.com

[root@git-server ~]# rz
[root@git-server ~]# ls
gitlab-ce-12.6.3-ce.0.el7.x86_64.rpm

安装gitlab

[root@git-server ~]# rpm -ivh gitlab-ce-12.6.3-ce.0.el7.x86_64.rpm 
warning: gitlab-ce-12.6.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-12.6.3-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

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


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

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登录链接

[root@git-server ~]# cd /etc/gitlab/
[root@git-server gitlab]# ls
gitlab.rb
[root@git-server gitlab]# vim gitlab.rb
external_url 'http://192.168.234.104'  对外提供服的公网ip
gitlab_rails['time_zone'] = 'Asia/Shanghai'  修改时区
gitlab_rails['gitlab_shell_ssh_port'] = 22   开启ssh服务
 git_data_dirs({
   "default" => {
     "path" => "/mnt/nfs-01/git-data"       数据路径
    }
 })

重新加载gitlab

[root@git-server gitlab]# gitlab-ctl reconfigure

在这里插入图片描述
重启gitlab

[root@git-server gitlab]# gitlab-ctl restart 

在这里插入图片描述
访问测试
公网ip http://192.168.234.104

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值