{"id":2741,"date":"2024-02-03T08:45:25","date_gmt":"2022-03-28T11:23:08","guid":{"rendered":""},"modified":"2025-02-02T00:46:19","modified_gmt":"2025-02-01T23:46:19","slug":"how-to-install-gitlab-on-rocky-linux-9","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-gitlab-on-rocky-linux-9\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 GitLab on Rocky Linux 9"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header><\/header>\n<article>\n<p><strong>GitLab<\/strong> is a powerful, open-source DevOps platform that provides source code management (SCM), continuous integration (CI\/CD), and project management tools in one application. It is an essential tool for managing software development workflows. In this guide, we will show you how to install GitLab on <strong>Rocky Linux 9<\/strong>. Hosting GitLab on a  ensures optimal performance and scalability for managing your code repositories using the dedicated resources of a <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before installing GitLab, ensure that your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> is up to date. Run the following commands to update your system:<\/p>\n<pre><code>sudo dnf update -y<\/code><\/pre>\n<p>Using a <strong>Windows VPS<\/strong> provides you with dedicated resources, ensuring GitLab performs efficiently, especially for large-scale development teams.<\/p>\n<h2>Step 2: Install Required Dependencies<\/h2>\n<p>GitLab requires several dependencies, including the ability to send email notifications. Install the necessary dependencies using the following command:<\/p>\n<pre><code>sudo dnf install -y curl policycoreutils openssh-server perl<\/code><\/pre>\n<p>Next, start and enable the SSH service:<\/p>\n<pre><code>\r\nsudo systemctl enable sshd\r\nsudo systemctl start sshd\r\n<\/code><\/pre>\n<p>If your server has a firewall enabled, allow OpenSSH through the firewall:<\/p>\n<pre><code>sudo firewall-cmd --permanent --add-service=ssh &amp;&amp; sudo firewall-cmd --reload<\/code><\/pre>\n<h2>Step 3: Add the GitLab Repository<\/h2>\n<p>GitLab provides an easy-to-use installation script that sets up the repository for you. Run the following command to download and add the GitLab repository:<\/p>\n<pre><code>\r\ncurl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash\r\n<\/code><\/pre>\n<h2>Step 4: Install GitLab<\/h2>\n<p>After adding the repository, install GitLab using the following command (replace <code>your-domain.com<\/code> with your server&#8217;s domain or IP address):<\/p>\n<pre><code>\r\nsudo EXTERNAL_URL=\"http:\/\/your-domain.com\" dnf install gitlab-ce -y\r\n<\/code><\/pre>\n<p>This will install GitLab and set it up to run on your server.<\/p>\n<h2>Step 5: Configure GitLab<\/h2>\n<p>Once GitLab is installed, you can configure it by editing the configuration file located at <code>\/etc\/gitlab\/gitlab.rb<\/code>. Open the file using your preferred editor:<\/p>\n<pre><code>sudo nano \/etc\/gitlab\/gitlab.rb<\/code><\/pre>\n<p>In this file, you can configure GitLab&#8217;s external URL, SSL settings, and other options. If you plan to use SSL, you will need to set up Let&#8217;s Encrypt or add your own certificates.<\/p>\n<p>After making changes, apply the configuration by running:<\/p>\n<pre><code>sudo gitlab-ctl reconfigure<\/code><\/pre>\n<h2>Step 6: Open Firewall for GitLab<\/h2>\n<p>By default, GitLab runs on port 80 (HTTP) or 443 (HTTPS). To allow access, open the necessary ports in the firewall:<\/p>\n<pre><code>\r\nsudo firewall-cmd --permanent --add-service=http\r\nsudo firewall-cmd --permanent --add-service=https\r\nsudo firewall-cmd --reload\r\n<\/code><\/pre>\n<h2>Step 7: Access the GitLab Web Interface<\/h2>\n<p>After installation, you can access GitLab via a web browser. Open your browser and go to <code>http:\/\/your-domain.com<\/code> (or <code>https:\/\/your-domain.com<\/code> if you configured SSL). The first time you access the interface, you will be prompted to set the GitLab root password.<\/p>\n<h2>Step 8: Set Up GitLab Admin Account<\/h2>\n<p>Once you&#8217;ve set the root password, log in to GitLab using the default username <code>root<\/code> and the password you just created. After logging in, you can create new users, set up projects, and configure your GitLab instance to meet your team&#8217;s needs.<\/p>\n<h2>Step 9: Manage GitLab Services<\/h2>\n<p>GitLab comes with a command-line tool to manage its services. To start, stop, or check the status of GitLab, use the following commands:<\/p>\n<ul>\n<ul>\n<li>Start GitLab:<\/li>\n<\/ul>\n<\/ul>\n<pre><code>sudo gitlab-ctl start<\/code><\/pre>\n<ul>\n<ul>\n<li>Stop GitLab:<\/li>\n<\/ul>\n<\/ul>\n<pre><code>sudo gitlab-ctl stop<\/code><\/pre>\n<ul>\n<ul>\n<li>Check the status of GitLab:<\/li>\n<\/ul>\n<\/ul>\n<pre><code>sudo gitlab-ctl status<\/code><\/pre>\n<h2>Step 10: Optimize Your VPS Server for GitLab<\/h2>\n<p>For optimal performance, it is highly recommended to host GitLab on a . A <strong>VPS server<\/strong> provides dedicated resources such as CPU, memory, and storage, which are crucial for managing large repositories, running CI\/CD pipelines, and handling high traffic. As your development team grows, a VPS allows you to scale your GitLab instance smoothly, ensuring continuous integration and code management workflows operate efficiently.<\/p>\n<h2>Conclusion<\/h2>\n<p>Installing GitLab on Rocky Linux 9 provides a robust platform for managing your source code, projects, and CI\/CD pipelines. By hosting GitLab on a , you gain better performance, scalability, and control, allowing your team to work more efficiently and securely.<\/p>\n<p>For more information about VPS hosting and optimizing your GitLab setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 GitLab is a powerful, open-source DevOps platform that provides source code management (SCM), continuous integration (CI\/CD), and project management tools in one application. It is an essential\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2741","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2741"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2741\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}