GitLab独立代码平台

搭建独立代码平台,最新版本!

        机器server:192.168.203.10

        机器client: 192.168.203.20

关闭防火墙和selinux:systemctl stop firewalld、setenforce 0

一、机器server的操作:

        配置yum源:

                vim /etc/yum.repo.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

        安装依赖:

                yum install -y curl policycoreutils-python openssh-server postfix   #postifx邮箱服务

                systemctl start postifx     #启动邮箱

        安装gitlab:

                本次时间会很长,等待。。。

                yum -y install gitlab-ce

二、配置gitlab登录

        vim  /etc/gitlab/gitlab.rb

        设置地区时间:

        

        设置ip     #本次是修改为机器ip

        

        去掉数据路径的注释

        

        开启ssh服务

        

三、初始化Gitlab,时间长

gitlab-ctl reconfigure

 四、启动Gitlab服务

        

        gitlab14版本以上会有默认root用户,密码存在/etc/gitlab/initial_root_password

                 

五、gitlab设置HTTPS方式

        

  • 如果想要以上的 https 方式正常生效使用,则需要把 letsencrypt 自动生成证书的配置打开,这样在执行重
  • 新让配置生效命令 (gitlab-ctl reconfigure) 的时候会自动给域名生成免费的证书并自动在 gitlab 自带的
  • nginx 中加上相关的跳转配置,都是全自动的,非常方便。
  • letsencrypt['enable'] = true
  • letsencrypt['contact_emails'] = ['caryyu@qq.com'] # 这应该是一组要添加为联系人的电子邮件地址

     

六、访问测试并修改密码

          

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值