Tuesday, 11 December 2018

Git: Install GitLab Server on RHEL/CentOS 7.6

Install Gitlab Server on RHEL CentOS 7.6GitLab is an open-source web-based git repository manager providing wiki, issue-tracking and CI/CD (Continuous Integration/Common Deployment). GitLab available in two editions, CE (Community Edition) and EE (Enterprise Edition). The GitLab CE has limited features while the GitLab EE is the commercial product and loaded with many additional features. Both GitLab CE & EE editions are available to download, however, the GitLab EE will provides same features as GitLab CE unless one acquires a license from GitLab.

In this article, we will install the GitLab EE on our Red Hat Enterprise Linux (RHEL) / CentOS 7.6 Server.

 

System Specification:

We have configured a virtual machine with following specification.

Hostname gitlab-server.itlab.com
IP Address 192.168.116.128/24
CPU 3.2 Ghz (2 Cores)
Memory 3 GB
Storage 60 GB

 

Install GitLab Server:

Connect to gitlab-server.itlab.com using ssh, and install required packages using yum command.

[root@gitlab-server ~]# yum install -y curl policycoreutils-python Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. localyum | 4.3 kB 00:00 (1/2): localyum/group_gz | 146 kB 00:00 (2/2): localyum/primary_db | 4.2 MB 00:00 Package curl-7.29.0-51.el7.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package policycoreutils-python.x86_64 0:2.5-29.el7 will be installed --> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-29.el7.x86_64 --> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-29.el7.x86_64 --> Running transaction check ---> Package audit-libs-python.x86_64 0:2.8.4-4.el7 will be installed ---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed ---> Package libcgroup.x86_64 0:0.41-20.el7 will be installed ---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed ---> Package python-IPy.noarch 0:0.75-6.el7 will be installed ---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: policycoreutils-python x86_64 2.5-29.el7 localyum 456 k Installing for dependencies: audit-libs-python x86_64 2.8.4-4.el7 localyum 76 k checkpolicy x86_64 2.5-8.el7 localyum 295 k libcgroup x86_64 0.41-20.el7 localyum 66 k libsemanage-python x86_64 2.5-14.el7 localyum 113 k python-IPy noarch 0.75-6.el7 localyum 32 k setools-libs x86_64 3.3.8-4.el7 localyum 620 k Transaction Summary ================================================================================ Install 1 Package (+6 Dependent packages) Total download size: 1.6 M Installed size: 5.3 M Downloading packages: -------------------------------------------------------------------------------- Total 9.9 MB/s | 1.6 MB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : setools-libs-3.3.8-4.el7.x86_64 1/7 Installing : audit-libs-python-2.8.4-4.el7.x86_64 2/7 Installing : python-IPy-0.75-6.el7.noarch 3/7 Installing : libsemanage-python-2.5-14.el7.x86_64 4/7 Installing : checkpolicy-2.5-8.el7.x86_64 5/7 Installing : libcgroup-0.41-20.el7.x86_64 6/7 Installing : policycoreutils-python-2.5-29.el7.x86_64 7/7 localyum/productid | 1.6 kB 00:00 Verifying : libcgroup-0.41-20.el7.x86_64 1/7 Verifying : checkpolicy-2.5-8.el7.x86_64 2/7 Verifying : libsemanage-python-2.5-14.el7.x86_64 3/7 Verifying : policycoreutils-python-2.5-29.el7.x86_64 4/7 Verifying : python-IPy-0.75-6.el7.noarch 5/7 Verifying : audit-libs-python-2.8.4-4.el7.x86_64 6/7 Verifying : setools-libs-3.3.8-4.el7.x86_64 7/7 Installed: policycoreutils-python.x86_64 0:2.5-29.el7 Dependency Installed: audit-libs-python.x86_64 0:2.8.4-4.el7 checkpolicy.x86_64 0:2.5-8.el7 libcgroup.x86_64 0:0.41-20.el7 libsemanage-python.x86_64 0:2.5-14.el7 python-IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-4.el7 Complete!

It also requires postfix and openssh-server packages. But both of them are already installed with minimal installation of Red Hat Enterprise Linux (RHEL) or CentOS 7.6.

Allow the http service through Linux firewall.

[root@gitlab-server ~]# firewall-cmd --permanent --add-service=http success [root@gitlab-server ~]# firewall-cmd --reload success

Add GitLab package repository to yum.

[root@gitlab-server ~]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6463 0 6463 0 0 3729 0 --:--:-- 0:00:01 --:--:-- 3729 Detected operating system as rhel/7. Checking for curl... Detected curl... Downloading repository file: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/config_file.repo?os=rhel&dist=7&source=script done. Installing pygpgme to verify GPG signatures... Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. gitlab_gitlab-ee-source/signature | 836 B 00:00 Retrieving key from https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey Importing GPG key 0xE15E78F4: Userid : "GitLab B.V. (package repository signing key) " Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4 From : https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey Retrieving key from https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg gitlab_gitlab-ee-source/signature | 951 B 00:01 !!! gitlab_gitlab-ee-source/primary | 175 B 00:02 Package pygpgme-0.3-9.el7.x86_64 already installed and latest version Nothing to do Installing yum-utils... Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Package yum-utils-1.1.31-50.el7.noarch already installed and latest version Nothing to do Generating yum cache for gitlab_gitlab-ee... Importing GPG key 0xE15E78F4: Userid : "GitLab B.V. (package repository signing key) " Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4 From : https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey The repository is setup! You can now install packages.

Install the GitLab Enterprise Edition as follows:

[root@gitlab-server ~]# EXTERNAL_URL="http://gitlab-server.itlab.com" yum install -y gitlab-ee Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. Resolving Dependencies --> Running transaction check ---> Package gitlab-ee.x86_64 0:11.5.3-ee.0.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: gitlab-ee x86_64 11.5.3-ee.0.el7 gitlab_gitlab-ee 495 M Transaction Summary ================================================================================ Install 1 Package Total download size: 495 M Installed size: 1.4 G Downloading packages: warning: /var/cache/yum/x86_64/7Server/gitlab_gitlab-ee/packages/gitlab-ee-11.5.3-ee.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY Public key for gitlab-ee-11.5.3-ee.0.el7.x86_64.rpm is not installed gitlab-ee-11.5.3-ee.0.el7.x86_64.rpm | 495 MB 65:20 Retrieving key from https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey Importing GPG key 0xE15E78F4: Userid : "GitLab B.V. (package repository signing key) " Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4 From : https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey Retrieving key from https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg Importing GPG key 0xF27EAB47: Userid : "GitLab, Inc. " Fingerprint: dbef 8977 4ddb 9eb3 7d9f c3a0 3cfc f9ba f27e ab47 From : https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : gitlab-ee-11.5.3-ee.0.el7.x86_64 1/1 ... ... ... Running handlers: Running handlers complete Chef Client finished, 457/672 resources updated in 18 minutes 23 seconds gitlab Reconfigured! *. *. *** *** ***** ***** .****** ******* ******** ******** ,,,,,,,,,***********,,,,,,,,, ,,,,,,,,,,,*********,,,,,,,,,,, .,,,,,,,,,,,*******,,,,,,,,,,,, ,,,,,,,,,*****,,,,,,,,,. ,,,,,,,****,,,,,, .,,,***,,,, ,*,. _______ __ __ __ / ____(_) /_/ / ____ _/ /_ / / __/ / __/ / / __ `/ __ \ / /_/ / / /_/ /___/ /_/ / /_/ / \____/_/\__/_____/\__,_/_.___/ Thank you for installing GitLab! GitLab should be available at http://gitlab-server.itlab.com For a comprehensive list of configuration options please see the Omnibus GitLab readme https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md Verifying : gitlab-ee-11.5.3-ee.0.el7.x86_64 1/1 Installed: gitlab-ee.x86_64 0:11.5.3-ee.0.el7 Complete!

GitLab EE (Enterprise Edition) has been installed on our system.

Browse the URL http://gitlab.itlab.com using a client’s browser.

GitLab-Change-Your-Password

Set the GitLab password for root user.

GitLab-Sign-in

Sign-in to GitLab using new password.

GitLab-Projects-Dashboard

Now, we are connected with our GitLab server.

We have successfully install GitLab server on our Red Hat Enterprise Linux (RHEL) / CentOS 7.6 machine.

Git: Install GitLab Server on RHEL/CentOS 7.6


YOU MIGHT ALSO LIKE:

1 comment: