{"id":13975,"date":"2022-01-18T15:24:01","date_gmt":"2022-01-18T15:24:01","guid":{"rendered":"https:\/\/linuxways.net\/?p=13975"},"modified":"2022-01-18T15:24:01","modified_gmt":"2022-01-18T15:24:01","slug":"how-to-install-gitlab-on-rocky-linux-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/red-hat\/how-to-install-gitlab-on-rocky-linux-8\/","title":{"rendered":"How to Install Gitlab on Rocky Linux 8"},"content":{"rendered":"<h2>What is GitLab?<\/h2>\n<p><a href=\"https:\/\/about.gitlab.com\/\">GitLab<\/a> is a free and open-source DevOps platform on which programmers can collaborate while developing a source code. The platform was specially created for remote work. So far, GitLab has about 30 million registered users, out of which 1 million are active license users.<\/p>\n<p>Today, we will see how to install GitLab on our system following a few easy-to-follow commands. For this, we have used <a href=\"https:\/\/rockylinux.org\/\">Rocky Linux 8<\/a> as our Operating System.<\/p>\n<h2>Requirements:<\/h2>\n<p>A valid Domain name mapped to your server<\/p>\n<p>Omnibus GitLab package takes 2.5 GB of space<\/p>\n<p>4 GB RAM (minimum)<\/p>\n<p>CPU: 4 cores (minimum)<\/p>\n<h2>Installation Guide:<\/h2>\n<h3>Step 1: Configure SSH (optional step)<\/h3>\n<p>These are optional steps; you can skip them if SSH is already enabled on your system.<\/p>\n<p>Download and install the OpenSSH-server perl package with this command:<\/p>\n<pre>sudo dnf install -y curl policycoreutils openssh-server perl<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"491\" height=\"26\" class=\"wp-image-13976\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-313.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-313.png 491w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-313-300x16.png 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>To check the status of the OpenSSH daemon, run the following command:<\/p>\n<pre>sudo systemctl status sshd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"28\" class=\"wp-image-13977\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-314.png\" \/><\/p>\n<p>Enable the daemon with this command:<\/p>\n<pre>sudo systemctl enable sshd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"223\" height=\"27\" class=\"wp-image-13978\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-315.png\" \/><\/p>\n<p>Now start the ssh service by running this command:<\/p>\n<pre>sudo systemctl start sshd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"211\" height=\"24\" class=\"wp-image-13979\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-316.png\" \/><\/p>\n<h3>Step 2: Configure Firewall (optional step)<\/h3>\n<p>In this step, we will configure the system firewall to allow HTTP and HTTPS access. This is also an optional step; you can skip it.<\/p>\n<p>To check the status of the firewall, run:<\/p>\n<pre>sudo systemctl status firewalld<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"252\" height=\"24\" class=\"wp-image-13980\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-317.png\" \/><\/p>\n<p>To open HTTP service on the system firewall, use this command:<\/p>\n<pre>sudo firewall-cmd --permanent --add-service=http<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"24\" class=\"wp-image-13981\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-318.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-318.png 396w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-318-300x18.png 300w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/p>\n<p>Now add HTTPS service on the system firewall with this command:<\/p>\n<pre>sudo firewall-cmd --permanent --add-service=https<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"25\" class=\"wp-image-13982\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-319.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-319.png 393w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-319-300x19.png 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/p>\n<p>To update configurations, restart the firewall.<\/p>\n<pre>sudo systemctl reload firewalld<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"257\" height=\"24\" class=\"wp-image-13983\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-320.png\" \/><\/p>\n<h3>Step 3: Install Postfix (optional step)<\/h3>\n<p>To send notification emails, we will need to install Postfix. If you want to use another service to deal with notification emails, like SMTP, you can skip this step. You can configure the settings after installation.<\/p>\n<p>To use the Postfix service, install it with the command mentioned below:<\/p>\n<pre>sudo dnf install postfix<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"28\" class=\"wp-image-13984\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-321.png\" \/><\/p>\n<p>Once the installation is completed, enable the service with the help of this command:<\/p>\n<pre>sudo systemctl enable postfix<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"26\" class=\"wp-image-13985\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-322.png\" \/><\/p>\n<p>Now start the service with this command:<\/p>\n<pre>sudo systemctl start postfix<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"224\" height=\"21\" class=\"wp-image-13986\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-323.png\" \/><\/p>\n<p>A configuration screen will appear during the installation of Postfix. Select \u2018Internet Site\u2019 and press enter. For DNS configuration, use your server\u2019s external DNS for \u2018mail name\u2019. In case more screens appear, keep pressing enter to accept the default configurations.<\/p>\n<h3>Step 4: Add and Install GitLab package<\/h3>\n<p>This is the key step. Here we will download and install GitLab on our system.<\/p>\n<p>To add the GitLab package repository, run this command:<\/p>\n<pre>curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"28\" class=\"wp-image-13987\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-324.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-324.png 778w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-324-300x11.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-324-768x28.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/p>\n<p>To install the package, we will run the command below. Make sure to change <a href=\"https:\/\/gitlab.example.com\">https:\/\/gitlab.example.com<\/a> to the URL at which you want to run your GitLab instance.<\/p>\n<pre>sudo EXTERNAL_URL=\"https:\/\/gitlab.example.com\" dnf install -y gitlab-ee<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"25\" class=\"wp-image-13988\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-325.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-325.png 578w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-325-300x13.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>Once the installation is all done, try accessing the external URL that you gave for GitLab. This will open GitLab login page for you.<\/p>\n<p>A random password will be generated and stored in the \/etc\/gitlab directory with the name initial_root_password.<\/p>\n<p>To log in, use root as your username and the password stored in the initial_root_password file. The password file will automatically be deleted after 24 hours. Make sure to reset the password.<\/p>\n<h2>How to uninstall GitLab<\/h2>\n<h3>Step 1: Stop GitLab service<\/h3>\n<p>Now that we have seen how to install GitLab, let\u2019s also see how can we uninstall this service. To do that, you first need to stop GitLab. Do that by running this command:<\/p>\n<pre>sudo gitlab-ctl stop<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"161\" height=\"27\" class=\"wp-image-13989\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-326.png\" \/><\/p>\n<h3>Step 2: Uninstall GitLab<\/h3>\n<p>Now you can uninstall GitLab with this command:<\/p>\n<pre>sudo gitlab-ctl uninstall<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"203\" height=\"21\" class=\"wp-image-13990\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-327.png\" \/><\/p>\n<p>Step 3: Remove the GitLab package<\/p>\n<p>The uninstall step will not completely uninstall GitLab. You will also have to remove GitLab package. Do that with this command:<\/p>\n<pre>sudo yum remove gitlab-ee<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"205\" height=\"24\" class=\"wp-image-13991\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-328.png\" \/><\/p>\n<p>After this step, reboot the machine to kill all the previous GitLab processes. GitLab will be completely uninstalled after the reboot.<\/p>\n<p>In this guide, we saw how to install GitLab. Then we also saw how to uninstall it with a help of three easy-to-follow commands. The complete installation will take around 5 to 10 minutes depending on your system specifications. Once it is done, configure GitLab, following these <a href=\"https:\/\/docs.gitlab.com\/ee\/install\/next_steps.html\">steps<\/a>. To see how you can install GitLab on Ubuntu 20.04, visit:<\/p>\n<p><a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-gitlab-in-ubuntu-20-04\/\">https:\/\/linuxways.net\/ubuntu\/how-to-install-gitlab-in-ubuntu-20-04\/<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>What is GitLab? GitLab is a free and open-source DevOps platform on which programmers can collaborate while developing a source code. The platform was specially created for remote&hellip;<\/p>","protected":false},"author":1,"featured_media":14086,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[165],"tags":[220,436],"class_list":["post-13975","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-red-hat","tag-gitlab","tag-rocky-linux-8"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13975"}],"version-history":[{"count":1,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13975\/revisions"}],"predecessor-version":[{"id":14085,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13975\/revisions\/14085"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14086"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}