设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 540|回复: 1
收起左侧

如何在Centos8中安装GitLab-CE

[复制链接]
发表于 2021-2-25 14:35:22 | 显示全部楼层 |阅读模式
GitLab是一个基于web界面的Git仓库管理程序,包括代码审计、wikis、问题跟踪等功能。使用GitLab创建、检查和部署代码非常容易。它可以托管在我们自己的服务器上,在官方服务器也提供免费的仓库托管,类似于Github。

GitLab有三个不同的版本可用:Community Edition(CE)、Enterprise Edition(EE)和 GitLab托管版本。其中CE版本是开源免费的。EE版本是企业版,需要付费使用的。

环境

推荐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.edu.cn/gitlab-ce/yum/el$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=httpsuccess[root@localhost ~]# firewall-cmd --permanent --add-service=httpssuccess[root@localhost ~]# firewall-cmd --reloadsuccess配置并启动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 statusweb界面访问GitLab

在浏览器输入本机ip地址,访问gitlab,第一次访问需要为管理员设置密码:


                               
登录/注册后可看大图

默认的用户是root,刚设置好密码,可以登录了:

                               
登录/注册后可看大图


                               
登录/注册后可看大图

然后就可以创建project了。

                               
登录/注册后可看大图

总结

GitLab能够集成大量的工具,如Slack、Hipchat、LDAP、JIRA、Jenkins、许多类型的钩子和一个完整的API。


您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-3-28 16:26 , Processed in 0.053276 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表