GitLab是一个基于web界面的Git仓库管理程序,包含代码审计、wikis、问题跟踪等性能。应用GitLab创立、检查和部署代码非常容易。它能够托管在咱们本人的服务器上,在官网服务器也提供收费的仓库托管,相似于Github。
GitLab有三个不同的版本可用:Community Edition(CE)、Enterprise Edition(EE)和 GitLab托管版本。其中CE版本是开源收费的。EE版本是企业版,须要付费应用的。
环境
- Centos8
- gitlab-ce-13.1.4
举荐cpu外围数量为4核,举荐内存大小为4GB。
装置GitLab-CE
新建/etc/yum.repos.d/gitlab-ce.repo仓库文件,而后复制内容到文件里。
[root@localhost ~]# touch /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua...$releasever/ gpgcheck=0 enabled=1
更新yum缓存,而后装置gitlab-ce:
[root@localhost ~]# yum makecache
[root@localhost ~]# yum -y install gitlab-ce
装置实现。
防火墙中凋谢端口
[root@localhost ~]# firewall-cmd --permanent --add-service=http
success
[root@localhost ~]# firewall-cmd --permanent --add-service=https
success
[root@localhost ~]# firewall-cmd --reload
success
配置并启动gitlab
刚装置完,须要配置一下gitlab。
[root@localhost ~]# gitlab-ctl reconfigure
配置实现之后曾经启动所有服务了,曾经设置好开机启动了。
gitlab-ctl
的罕用的操作:
重置利用
gitlab-ctl reconfigure
启动所有服务
gitlab-ctl start
敞开所有服务
gitlab-ctl stop
重启所有服务
gitlab-ctl restart
列出所有服务
gitlab-ctl service-list
查看服务状态
gitlab-ctl status
web界面拜访GitLab
在浏览器输出本机ip地址,拜访gitlab,第一次拜访须要为管理员设置明码:
默认的用户是root
,刚设置好明码,能够登录了:
而后就能够创立project了。
总结
GitLab可能集成大量的工具,如Slack、Hipchat、LDAP、JIRA、Jenkins、许多类型的钩子和一个残缺的API。