(安装过可以不用安装)一般云服务器都自带安装好的;
yum install -y vim wget2. 准备安装GitLab
yum install -y postfix sshd policycoreutils-python postfix 邮件通知 sshd ssh服务(一般系统已经有了,可以不装) policycoreutils-python GitLab必备依赖 设置postfix开机自启: chkconfig --add postfix3. 开始安装GitLab
官网下载地址: https://packages.gitlab.com/app/gitlab/gitlab-ce/search?q=10.0.2
以CentOS 6 为例: https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/6/gitlab-ce-10.0.2-ce.0.el6.x86_64.rpm
安装方式2种: 使用yum 和 rpm包,本文介绍yum方式
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash yum install -y gitlab-ce-10.0.2-ce.0.el6.x86_644. 配置GitLab
vim /etc/gitlab/gitlab.rb5. 启动GitLab
刷新配置: gitlab-ctl reconfigure 重启服务: gitlab-ctl restart6. 访问GitLab
此时还不能访问,需要关闭防火墙 service iptables stop 或者 在防火墙中开放80端口: 编辑iptables vi /etc/sysconfig/iptables 添加配置 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 重启防火墙 service iptables restart
如果是阿里云服务器,可以在https://blog.csdn.net/weixin_41771374/article/details/120488030找到设置安全组的方法;
访问 http://你的IP/
后面就可以使用你自己的gitlab了。



