How to Install GitLab-CE in Centos8

Time:2022-9-23

GitLab is a web interface based Git repository management program that includes code auditing, wikis, issue tracking, and more. It’s very easy to create, inspect and deploy code with GitLab. It can be hosted on our own servers and also offers free repository hosting on official servers, similar to Github.

GitLab is available in three different editions: Community Edition (CE), Enterprise Edition (EE), and GitLab Hosted Edition. The CE version is open source and free. The EE version is an enterprise version and needs to be paid for.

surroundings

The recommended number of CPU cores is 4 cores, and the recommended memory size is 4GB.

Install GitLab-CE

Create a new /etc/yum.repos.d/gitlab-ce.repo repository file and copy the contents to the file.

[[email protected] ~]# touch /etc/yum.repos.d/gitlab-ce.repo

[gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua…$releasever/ gpgcheck=0 enabled=1

How to Install GitLab-CE in Centos8
Update the yum cache, then install gitlab-ce:

[[email protected] ~]# yum makecache
[[email protected] ~]# yum -y install gitlab-ce

How to Install GitLab-CE in Centos8
The installation is complete.

open ports in firewall

[[email protected] ~]# firewall-cmd –permanent –add-service=http
success
[[email protected] ~]# firewall-cmd –permanent –add-service=https
success
[[email protected] ~]# firewall-cmd –reload
success

Configure and start gitlab

Just installed, you need to configure gitlab.

[[email protected] ~]# gitlab-ctl reconfigure

After the configuration is complete, all services have been started, and the startup has been set up.

gitlab-ctlThe commonly used operations:

reset app

gitlab-ctl reconfigure

start all services

gitlab-ctl start

turn off all services

gitlab-ctl stop

restart all services

gitlab-ctl restart

List all services

gitlab-ctl service-list

View service status

gitlab-ctl status

Web interface to access GitLab

Enter the local ip address in the browser to access gitlab. The first time you access, you need to set a password for the administrator:
How to Install GitLab-CE in Centos8
The default user isroot, just set the password, you can log in:
How to Install GitLab-CE in Centos8

How to Install GitLab-CE in Centos8
Then you can create a project.
How to Install GitLab-CE in Centos8

Summarize

GitLab is able to integrate a large number of tools like Slack, Hipchat, LDAP, JIRA, Jenkins, many types of hooks and a complete API.