cd local
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
配置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 #退出并保存
- gitlab-ctl reconfigure gitlab-ctl restart
访问:
http://192.168.1.81:9999