CentOS 安装gitlab

cd /usr/local/src/

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm


rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm


warning: gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 signature: NOKEY, key ID f27eab47
error: Failed dependencies:
openssh-server is needed by gitlab-ce-10.0.0-ce.0.el7.x86_64

policycoreutils-python is needed by gitlab-ce-10.0.0-ce.0.el7.x86_64


  1. 配置gitlab

    #打开配置文件 gitlab.rb
    [root@VM_177_101_centos gitlab]# vim /etc/gitlab/gitlab.rb
    
    #修改外网访问地址 13行
    #ip为主机的ip地址,端口默认是8080,这里为了避免出现占用,也进行修改一下,我的配置为9999
    external_url = 'http://192.168.1.81:9999'
    
    
    
    #修改nginx监听
    #gitlab默认使用了nginx进行反向代理,这里我重新配置了一下 579行~580行
    unicorn['listen'] = '127.0.0.1'
    unicorn['port'] = 8082
    
    #重新配置nginx 800行
    nginx['enable'] = true
    nginx['listen_addresses'] = ['*']
    nginx['listen_port'] = 82
    
    #退出并保存
  2. gitlab-ctl reconfigure gitlab-ctl restart



访问:

http://192.168.1.81:9999

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值