Centos8中安装GitLab-CE具体步骤

2023-11-22 0 157

gitLab 是一个基于 Git 实现的在线代码仓库托管软件 可以用 gitlab 自己搭建一个类似于 Github 一样的系统,一般用于在企业、学校等内部网络搭建 git 私服。 对于软件工程质量管理非常重要。下面为大家详细讲解一下Centos8中安装GitLab-CE具体步骤。

环境

  • 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.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=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。

本文来源:www.lxlinux.net/8710.html,若引用不当,请联系修改。

相关文章

猜你喜欢
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

  • 0 +

    访问总数

  • 0 +

    会员总数

  • 0 +

    文章总数

  • 0 +

    今日发布

  • 0 +

    本周发布

  • 4975 +

    运行天数

你的前景,远超我们想象