{"id":4927,"date":"2021-03-10T07:06:29","date_gmt":"2021-03-10T07:06:29","guid":{"rendered":"https:\/\/linuxways.net\/?p=4927"},"modified":"2021-03-13T06:06:54","modified_gmt":"2021-03-13T06:06:54","slug":"how-to-install-gitlab-on-centos-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-install-gitlab-on-centos-8\/","title":{"rendered":"How to install Gitlab on CentOS 8"},"content":{"rendered":"<div id=\"wpbody\">\nGitlab is an application tool that is used for source code management. Users can use this tool as an alternative to Github and they can simply install the GitLab CE server and enjoy the full advantages of its useful features including code reviews, wikis, issue tracking, and activity feeds. GitLab is an online git repository manager on which different team members can communicate on testing, coding, and application deployment. We will install Gitlab In this article on CentOS 8 through the command line.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>Execute all commands must under the root privileges.<\/p>\n<h2><strong>Installation of GitLab on CentOS 8<\/strong><\/h2>\n<p>Follow the below-given steps to install Gitlab on your system Centos:<\/p>\n<h2><strong>Step 1: Install Required Packages repository\u00a0<\/strong><\/h2>\n<p>First, you need to install the prerequisites including the OpenSSH and Postfix packages on your system that are required to install GitLab. Open the terminal from the left side bar of the activities menu which is also shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"848\" class=\"wp-image-4928\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-53.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-53.png 992w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-53-300x256.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-53-768x657.png 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/p>\n<p>So, install all packages dependencies for the GitLab CE by using the following dnf command:<\/p>\n<pre>\r\n$ sudo dnf -y install curl policycoreutils openssh-server openssh-clients postfix\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1199\" height=\"766\" class=\"wp-image-4929\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-54.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-54.png 1199w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-54-300x192.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-54-1024x654.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-54-768x491.png 768w\" sizes=\"auto, (max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<p>Once the installation is completed, by using the following commands enable and start the services of postfix and SSH.<\/p>\n<pre>\r\n$ systemctl start sshd\r\n\r\n$ systemctl start postfix\r\n<\/pre>\n<p>After that, enable or add both services on system boot.<\/p>\n<pre>\r\n$ systemctl enable sshd\r\n\r\n$ systemctl enable postfix\r\n<\/pre>\n<p>Now, services are enabled. Check the running status of each service by executing the following command:<\/p>\n<pre>\r\n$ systemctl status sshd\r\n\r\n$ systemctl status postfix\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1197\" height=\"465\" class=\"wp-image-4930\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-55.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-55.png 1197w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-55-300x117.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-55-1024x398.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-55-768x298.png 768w\" sizes=\"auto, (max-width: 1197px) 100vw, 1197px\" \/><\/p>\n<h2><strong>Step 2: Add Repository and Install GitLab<\/strong><\/h2>\n<p>To install GitLab CE, add the official GitLab repository on your CentOS 8 system. Add the GitLab repository to your system by using the following script:<\/p>\n<pre>\r\n$ curl -s https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash\r\n<\/pre>\n<p>After running the above script, the following results display on the terminal window:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1190\" height=\"759\" class=\"wp-image-4931\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-56.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-56.png 1190w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-56-300x191.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-56-1024x653.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-56-768x490.png 768w\" sizes=\"auto, (max-width: 1190px) 100vw, 1190px\" \/><\/p>\n<h2><strong>Step 3: Install GitLab CE on CentOS 8<\/strong><\/h2>\n<p>Now, run the below-mentioned command to install the GitLab CE packages on your system:<\/p>\n<pre>\r\n$ sudo dnf install gitlab-ce \u2013y\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1199\" height=\"732\" class=\"wp-image-4932\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-57.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-57.png 1199w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-57-300x183.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-57-1024x625.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-57-768x469.png 768w\" sizes=\"auto, (max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<p>Once the installation of all packages is completed, the following result will notify the installation of GitLab on your system:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1186\" height=\"763\" class=\"wp-image-4933\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-58.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-58.png 1186w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-58-300x193.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-58-1024x659.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-58-768x494.png 768w\" sizes=\"auto, (max-width: 1186px) 100vw, 1186px\" \/><\/p>\n<p>Now, the GitLab community edition is installed on your CentOS 8 system.<\/p>\n<h2><strong>Step 4: configure the GitLab CE on CentOS 8<\/strong><\/h2>\n<p>Open the following configuration file in any text editor as follows:<\/p>\n<pre>\r\n$ sudo nano \/etc\/gitlab\/gitlab.rb\r\n<\/pre>\n<p>Paste your desire external URL in it as follows:<\/p>\n<p>external_url &#8216;<a href=\"https:\/\/gitlab.vitux.com\">https:\/\/gitlab.example.com<\/a>&#8216;<\/p>\n<p>Save changes and then run the below-given command to reconfigure the GitLab CE:<\/p>\n<pre>\r\n$ sudo gitlab-ctl reconfigure\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1191\" height=\"686\" class=\"wp-image-4934\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-59.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-59.png 1191w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-59-300x173.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-59-1024x590.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-59-768x442.png 768w\" sizes=\"auto, (max-width: 1191px) 100vw, 1191px\" \/><\/p>\n<p>Change the firewall configuration by running the following commands:<\/p>\n<pre>\r\n$ sudo firewall-cmd --permanent --add-service={ssh,http,https} --permanent\r\n\r\n$ sudo firewall-cmd --reload\r\n<\/pre>\n<p>Now, open the GitLab web console and type the <a href=\"https:\/\/gitlab.vitux.com\">https:\/\/gitlab.example.com<\/a> URL in the address bar as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1176\" height=\"640\" class=\"wp-image-4935\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-60.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-60.png 1176w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-60-300x163.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-60-1024x557.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-60-768x418.png 768w\" sizes=\"auto, (max-width: 1176px) 100vw, 1176px\" \/><\/p>\n<p>Once you successfully login to the GitLab, visit the GitLab tutorial and start work on it.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>We have installed and configured GitLab CE on CentOS 8 in this article. Finally, GitLab is installed on your CentOS 8 system now.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Gitlab is an application tool that is used for source code management. Users can use this tool as an alternative to Github and they can simply install the&hellip;<\/p>","protected":false},"author":1,"featured_media":5012,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[93,220],"class_list":["post-4927","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-8","tag-gitlab"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/4927","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=4927"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/4927\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5012"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=4927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=4927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=4927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}