gitlab搭建

概述

gitlab是完全私有的git项目,github是公共的git项目。

 

服务器环境

centos6

 

部署命令

yum install curl policycoreutils-python openssh-server
yum -y install postfix
systemctl start postfix
systemctl enable postfix
systemctl status postfix

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


firewall-cmd --permanent --add-service=80/tcp
firewall-cmd --permanent --add-service=443/tcp
systemctl reload firewalld

重新配置

gitlab-ctl reconfigure

 

启动和关闭

gitlab-ctl start

gitlab-ctl stop

gitlab-ctl restart


gitlab-ctl show-config


常用日志
tailf /var/log/gitlab/gitlab-rails/production.log


报错分析
问题:Can't verify CSRF token authenticity

解决:无法通过nginx+gitlab方式转发,涉及跨域问题。解决方案,直接用tcp端口转发(nginx或者iptables都可以),放弃http转发

posted @ 2019-05-02 14:36  狂奔的骆驼  阅读(407)  评论(0编辑  收藏  举报