栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

linux搭建GitLab

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

linux搭建GitLab

linux搭建GitLab 1. 安装必备Linux插件

(安装过可以不用安装)一般云服务器都自带安装好的;

yum install -y vim wget
2. 准备安装GitLab
yum install -y postfix sshd policycoreutils-python

postfix 邮件通知
sshd ssh服务(一般系统已经有了,可以不装)
policycoreutils-python GitLab必备依赖
设置postfix开机自启: chkconfig --add postfix
3. 开始安装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_64

4. 配置GitLab
vim /etc/gitlab/gitlab.rb

5. 启动GitLab
刷新配置: gitlab-ctl reconfigure
重启服务: gitlab-ctl restart
6. 访问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了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/272750.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号