当前位置: 首页 > Linux

Centos8如何安装GitLab-CE

时间:2023-04-06 06:32:17 Linux

GitLab是一个基于web界面的Git仓库管理程序,包括代码审计、wikis、问题跟踪等功能。使用GitLab创建、审查和部署代码非常容易。可以托管在我们自己的服务器上,官方服务器也提供免费的仓库托管,类似Github。GitLab提供三个不同的版本:社区版(CE)、企业版(EE)和GitLab托管版。CE版本是开源且免费的。EE版是企业版,需要付费。环境Centos8gitlab-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=GitlabCERepositorybaseurl=https://mirrors.tuna.tsinghua...$releasever/gpgcheck=0enabled=1更新yum缓存,然后安装gitlab-ce:[root@localhost~]#yummakecache[root@localhost~]#yum-yinstallgitlab-ce安装完成。在防火墙中打开端口[root@localhost~]#firewall-cmd--permanent--add-service=httpssuccess[root@localhost~]#firewall-cmd--permanent--add-service=httpsuccess[root@localhost~]#firewall-cmd--reloadsuccess配置并启动刚刚安装的gitlab,需要配置gitlab。[root@localhost~]#gitlab-ctlreconfigure配置完成后,所有服务都已经启动,设置开机启动。gitlab-ctl常用操作:resetapplicationgitlab-ctlreconfigurestartallservicesgitlab-ctlstartcloseallservicesgitlab-ctlstoprestartallservicesgitlab-ctlrestartlistallservicesgitlab-ctlservice-list查看服务状态gitlab-ctlstatusweb访问GitLab的界面在浏览器中输入本机ip地址,即可访问gitlab。首次访问需要设置管理员密码:默认用户为root,设置密码即可,即可登录:然后即可创建项目。.总结GitLab能够集成Slack、Hipchat、LDAP、JIRA、Jenkins等大量工具,多种类型的hooks和完整的API。