Install Gitlab on CentOS 7 via Command Line

Posted on

Using an already configured and installed guest machine running on a Virtual Machine Manager, in this article there will be some steps described for installing Gitlab.

1. The first step is accessing the guest machine from the host machine as shown below :

user@hostname:~/test-file$ ssh [email protected]
The authenticity of host 'xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxx.xxx.xxx.xxx' (ECDSA) to the list of known hosts.
[email protected]'s password:
Last login: Fri Dec 16 11:03:36 2016 from gateway
[root@hostname ~]#

2. After successfully connected to the guest machine, install and configure the necessary dependencies for further preparation in order to install gitlab. Below is the steps on the preparation :

sudo yum install curl policycoreutils openssh-server openssh-clients

Below is the command’s execution output :

[root@hostname ~]# yum install curll policycoreutils openssh-server openssh-clients
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package curll available.
Resolving Dependencies
--> Running transaction check
---> Package openssh-clients.x86_64 0:6.6.1p1-25.el7_2 will be updated
---> Package openssh-clients.x86_64 0:6.6.1p1-31.el7 will be an update
--> Processing Dependency: openssh = 6.6.1p1-31.el7 for package: openssh-clients-6.6.1p1-31.el7.x86_64
---> Package openssh-server.x86_64 0:6.6.1p1-25.el7_2 will be updated
---> Package openssh-server.x86_64 0:6.6.1p1-31.el7 will be an update
---> Package policycoreutils.x86_64 0:2.2.5-20.el7 will be updated
---> Package policycoreutils.x86_64 0:2.5-9.el7 will be an update
--> Processing Dependency: libsepol >= 2.5-6 for package: policycoreutils-2.5-9.el7.x86_64
--> Processing Dependency: libselinux-utils >= 2.5-6 for package: policycoreutils-2.5-9.el7.x86_64
--> Processing Dependency: libsepol.so.1(LIBSEPOL_1.1)(64bit) for package: policycoreutils-2.5-9.el7.x86_64
--> Processing Dependency: libsepol.so.1(LIBSEPOL_1.0)(64bit) for package: policycoreutils-2.5-9.el7.x86_64
--> Processing Dependency: libsemanage.so.1(LIBSEMANAGE_1.1)(64bit) for package: policycoreutils-2.5-9.el7.x86_64
--> Running transaction check
---> Package libselinux-utils.x86_64 0:2.2.2-6.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-6.el7 will be an update
--> Processing Dependency: libselinux(x86-64) = 2.5-6.el7 for package: libselinux-utils-2.5-6.el7.x86_64
---> Package libsemanage.x86_64 0:2.1.10-18.el7 will be updated
---> Package libsemanage.x86_64 0:2.5-4.el7 will be an update
---> Package libsepol.x86_64 0:2.1.9-3.el7 will be updated
---> Package libsepol.x86_64 0:2.5-6.el7 will be an update
---> Package openssh.x86_64 0:6.6.1p1-25.el7_2 will be updated
---> Package openssh.x86_64 0:6.6.1p1-31.el7 will be an update
--> Running transaction check
---> Package libselinux.x86_64 0:2.2.2-6.el7 will be updated
--> Processing Dependency: libselinux = 2.2.2-6.el7 for package: libselinux-python-2.2.2-6.el7.x86_64
---> Package libselinux.x86_64 0:2.5-6.el7 will be an update
--> Running transaction check
---> Package libselinux-python.x86_64 0:2.2.2-6.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-6.el7 will be an update
--> Processing Conflict: openssh-6.6.1p1-31.el7.x86_64 conflicts selinux-policy < 3.13.1-92
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package selinux-policy.noarch 0:3.13.1-60.el7_2.9 will be updated
--> Processing Dependency: selinux-policy = 3.13.1-60.el7_2.9 for package: selinux-policy-targeted-3.13.1-60.el7_2.9.noarch
--> Processing Dependency: selinux-policy = 3.13.1-60.el7_2.9 for package: selinux-policy-targeted-3.13.1-60.el7_2.9.noarch
---> Package selinux-policy.noarch 0:3.13.1-102.el7_3.7 will be an update
--> Running transaction check
---> Package selinux-policy-targeted.noarch 0:3.13.1-60.el7_2.9 will be updated
---> Package selinux-policy-targeted.noarch 0:3.13.1-102.el7_3.7 will be an update
--> Processing Conflict: libselinux-2.5-6.el7.x86_64 conflicts systemd < 219-20
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package systemd.x86_64 0:219-19.el7_2.13 will be updated
--> Processing Dependency: systemd = 219-19.el7_2.13 for package: systemd-sysv-219-19.el7_2.13.x86_64
---> Package systemd.x86_64 0:219-30.el7_3.6 will be an update
--> Processing Dependency: systemd-libs = 219-30.el7_3.6 for package: systemd-219-30.el7_3.6.x86_64
--> Running transaction check
---> Package systemd-libs.x86_64 0:219-19.el7_2.13 will be updated
--> Processing Dependency: systemd-libs = 219-19.el7_2.13 for package: libgudev1-219-19.el7_2.13.x86_64
---> Package systemd-libs.x86_64 0:219-30.el7_3.6 will be an update
---> Package systemd-sysv.x86_64 0:219-19.el7_2.13 will be updated
---> Package systemd-sysv.x86_64 0:219-30.el7_3.6 will be an update
--> Running transaction check
---> Package libgudev1.x86_64 0:219-19.el7_2.13 will be updated
---> Package libgudev1.x86_64 0:219-30.el7_3.6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================================
Updating:
openssh-clients x86_64 6.6.1p1-31.el7 base 642 k
openssh-server x86_64 6.6.1p1-31.el7 base 439 k
policycoreutils x86_64 2.5-9.el7 update 841 k
selinux-policy noarch 3.13.1-102.el7_3.7 update 412 k
systemd x86_64 219-30.el7_3.6 update 5.2 M
Updating for dependencies:
libgudev1 x86_64 219-30.el7_3.6 update 76 k
libselinux x86_64 2.5-6.el7 base 161 k
libselinux-python x86_64 2.5-6.el7 base 234 k
libselinux-utils x86_64 2.5-6.el7 base 151 k
libsemanage x86_64 2.5-4.el7 base 144 k
libsepol x86_64 2.5-6.el7 base 288 k
openssh x86_64 6.6.1p1-31.el7 base 437 k
selinux-policy-targeted noarch 3.13.1-102.el7_3.7 update 6.4 M
systemd-libs x86_64 219-30.el7_3.6 update 368 k
systemd-sysv x86_64 219-30.el7_3.6 update 63 k
Transaction Summary
==================================================================================================================================================================================================================================
Upgrade 5 Packages (+10 Dependent packages)
Total download size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/15): libgudev1-219-30.el7_3.6.x86_64.rpm | 76 kB 00:00:21
(2/15): libselinux-2.5-6.el7.x86_64.rpm | 161 kB 00:00:21
(3/15): libselinux-python-2.5-6.el7.x86_64.rpm | 234 kB 00:00:21
(4/15): libselinux-utils-2.5-6.el7.x86_64.rpm | 151 kB 00:00:29
(5/15): libsemanage-2.5-4.el7.x86_64.rpm | 144 kB 00:00:29
(6/15): libsepol-2.5-6.el7.x86_64.rpm | 288 kB 00:00:02
(7/15): openssh-6.6.1p1-31.el7.x86_64.rpm | 437 kB 00:00:02
(8/15): openssh-clients-6.6.1p1-31.el7.x86_64.rpm | 642 kB 00:00:00
(9/15): openssh-server-6.6.1p1-31.el7.x86_64.rpm | 439 kB 00:00:00
(10/15): selinux-policy-3.13.1-102.el7_3.7.noarch.rpm | 412 kB 00:00:00
(11/15): policycoreutils-2.5-9.el7.x86_64.rpm | 841 kB 00:00:00
(12/15): systemd-219-30.el7_3.6.x86_64.rpm | 5.2 MB 00:00:00
(13/15): systemd-libs-219-30.el7_3.6.x86_64.rpm | 368 kB 00:00:00
(14/15): systemd-sysv-219-30.el7_3.6.x86_64.rpm | 63 kB 00:00:00
(15/15): selinux-policy-targeted-3.13.1-102.el7_3.7.noarch.rpm | 6.4 MB 00:00:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 289 kB/s | 16 MB 00:00:55
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libsepol-2.5-6.el7.x86_64 1/30
Updating : libselinux-2.5-6.el7.x86_64 2/30
Updating : systemd-libs-219-30.el7_3.6.x86_64 3/30
Updating : systemd-219-30.el7_3.6.x86_64 4/30
Updating : openssh-6.6.1p1-31.el7.x86_64 5/30
Updating : libsemanage-2.5-4.el7.x86_64 6/30
Updating : libselinux-utils-2.5-6.el7.x86_64 7/30
Updating : policycoreutils-2.5-9.el7.x86_64 8/30
Updating : selinux-policy-3.13.1-102.el7_3.7.noarch 9/30
Updating : selinux-policy-targeted-3.13.1-102.el7_3.7.noarch 10/30
warning: /etc/selinux/targeted/seusers created as /etc/selinux/targeted/seusers.rpmnew
‘/etc/selinux/targeted/modules/active/seusers’ -> ‘/etc/selinux/targeted/active/seusers.local’
Updating : openssh-server-6.6.1p1-31.el7.x86_64 11/30
Updating : openssh-clients-6.6.1p1-31.el7.x86_64 12/30
Updating : systemd-sysv-219-30.el7_3.6.x86_64 13/30
Updating : libgudev1-219-30.el7_3.6.x86_64 14/30
Updating : libselinux-python-2.5-6.el7.x86_64 15/30
Cleanup : openssh-server-6.6.1p1-25.el7_2.x86_64 16/30
Cleanup : selinux-policy-targeted-3.13.1-60.el7_2.9.noarch 17/30
warning: /etc/selinux/targeted/modules/active/seusers.final saved as /etc/selinux/targeted/modules/active/seusers.final.rpmsave
Cleanup : selinux-policy-3.13.1-60.el7_2.9.noarch 18/30
Cleanup : systemd-sysv-219-19.el7_2.13.x86_64 19/30
Cleanup : policycoreutils-2.2.5-20.el7.x86_64 20/30
Cleanup : libsemanage-2.1.10-18.el7.x86_64 21/30
Cleanup : systemd-219-19.el7_2.13.x86_64 22/30
Cleanup : openssh-clients-6.6.1p1-25.el7_2.x86_64 23/30
Cleanup : openssh-6.6.1p1-25.el7_2.x86_64 24/30
Cleanup : libselinux-utils-2.2.2-6.el7.x86_64 25/30
Cleanup : libgudev1-219-19.el7_2.13.x86_64 26/30
Cleanup : systemd-libs-219-19.el7_2.13.x86_64 27/30
Cleanup : libselinux-python-2.2.2-6.el7.x86_64 28/30
Cleanup : libselinux-2.2.2-6.el7.x86_64 29/30
Cleanup : libsepol-2.1.9-3.el7.x86_64 30/30
Verifying : selinux-policy-3.13.1-102.el7_3.7.noarch 1/30
Verifying : libselinux-python-2.5-6.el7.x86_64 2/30
Verifying : systemd-libs-219-30.el7_3.6.x86_64 3/30
Verifying : libselinux-utils-2.5-6.el7.x86_64 4/30
Verifying : openssh-server-6.6.1p1-31.el7.x86_64 5/30
Verifying : libsepol-2.5-6.el7.x86_64 6/30
Verifying : policycoreutils-2.5-9.el7.x86_64 7/30
Verifying : systemd-sysv-219-30.el7_3.6.x86_64 8/30
Verifying : selinux-policy-targeted-3.13.1-102.el7_3.7.noarch 9/30
Verifying : libselinux-2.5-6.el7.x86_64 10/30
Verifying : libgudev1-219-30.el7_3.6.x86_64 11/30
Verifying : systemd-219-30.el7_3.6.x86_64 12/30
Verifying : openssh-6.6.1p1-31.el7.x86_64 13/30
Verifying : openssh-clients-6.6.1p1-31.el7.x86_64 14/30
Verifying : libsemanage-2.5-4.el7.x86_64 15/30
Verifying : openssh-server-6.6.1p1-25.el7_2.x86_64 16/30
Verifying : selinux-policy-3.13.1-60.el7_2.9.noarch 17/30
Verifying : libsemanage-2.1.10-18.el7.x86_64 18/30
Verifying : libgudev1-219-19.el7_2.13.x86_64 19/30
Verifying : libselinux-utils-2.2.2-6.el7.x86_64 20/30
Verifying : openssh-6.6.1p1-25.el7_2.x86_64 21/30
Verifying : systemd-libs-219-19.el7_2.13.x86_64 22/30
Verifying : systemd-sysv-219-19.el7_2.13.x86_64 23/30
Verifying : selinux-policy-targeted-3.13.1-60.el7_2.9.noarch 24/30
Verifying : libsepol-2.1.9-3.el7.x86_64 25/30
Verifying : libselinux-python-2.2.2-6.el7.x86_64 26/30
Verifying : openssh-clients-6.6.1p1-25.el7_2.x86_64 27/30
Verifying : systemd-219-19.el7_2.13.x86_64 28/30
Verifying : policycoreutils-2.2.5-20.el7.x86_64 29/30
Verifying : libselinux-2.2.2-6.el7.x86_64 30/30
Updated:
openssh-clients.x86_64 0:6.6.1p1-31.el7 openssh-server.x86_64 0:6.6.1p1-31.el7 policycoreutils.x86_64 0:2.5-9.el7 selinux-policy.noarch 0:3.13.1-102.el7_3.7 systemd.x86_64 0:219-30.el7_3.6
Dependency Updated:
libgudev1.x86_64 0:219-30.el7_3.6 libselinux.x86_64 0:2.5-6.el7 libselinux-python.x86_64 0:2.5-6.el7 libselinux-utils.x86_64 0:2.5-6.el7 libsemanage.x86_64 0:2.5-4.el7 libsepol.x86_64 0:2.5-6.el7
openssh.x86_64 0:6.6.1p1-31.el7 selinux-policy-targeted.noarch 0:3.13.1-102.el7_3.7 systemd-libs.x86_64 0:219-30.el7_3.6 systemd-sysv.x86_64 0:219-30.el7_3.6
Complete!
[root@hostname ~]#

The next executed command to enable SSH service is shown below :

sudo systemctl enable sshd

To check whether the service has already been activated or not, execute the following command :

systemctl list-unit-files | grep sshd.service

Below is the execution of the command in real situation :

[root@hostname ~]# systemctl list-unit-files | grep sshd.service
sshd.service                                  enabled
[root@hostname ~]#

Starting the sshd service by executing the following command :

sudo systemctl start sshd

Below is the sample output of SSH service’s execution :

[root@centos ~]# systemctl start sshd.service

The status of the sshd service itself can be checked whether it has started or not by executing the following command :

systemctl status sshd.service

Below is the output of the command :

[root@centos ~]# systemctl status sshd.service
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2016-12-16 15:32:46; 1h 12min ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 11137 (sshd)
   CGroup: /system.slice/sshd.service
           └─11137 /usr/sbin/sshd
Des 16 15:32:46 centos systemd[1]: Starting OpenSSH server daemon...
Des 16 15:32:46 centos sshd[11137]: Server listening on 0.0.0.0 port 22.
Des 16 15:32:46 centos sshd[11137]: Server listening on :: port 22.
Des 16 15:32:46 centos systemd[1]: Started OpenSSH server daemon.
Dec 16 16:39:52 centos sshd[13932]: Accepted password for root from 192.168.122.1 port 33310 ssh2
[root@hostname ~]# 

3. The next important step is installing Postfix so that Gitlab can use the feature owned for sending email in order to pass any notifications generated from Gitlab. Postfix itself is well-known as an alternative MTA (Mail Transfer Agent) to route and to deliver electronic mail besides Sendmail. Another different MTA can also be used to be specified to perform this feature such as Sendmail or a configured custom SMTP server. Do the following command to install postfix :

sudo yum install postfix

Below is the command’s execution above in the real situation which is fortunately the server has postfix already installed :

[root@hostname ~]# yum install postfix
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package matching 2:postfix-2.10.1-6.el7.x86_64 already installed. Checking for update.
Nothing to do
[root@centos ~]#
The next step which is needed to be performed after installing the Postfix itself is enabling the service itself as shown below :
sudo systemctl enable postfix

After enabling Postfix service, the next step is starting the installed Postfix service by executing the following command :

sudo systemctl start postfix

The execution command in the bash prompt :

[root@hostname ~]# systemctl enable postfix

After enabling postfix service, below is the command which is needed to be execute to start the postfix service :

systemctl start postfix

The execution command in the bash prompt :

[root@hostname ~]# systemctl start postfix

4. After successfully installing, enabling and starting Postfix service, execute the following command to add ‘http’ service so that it can be excluded from being rejected whenever there are incoming requests come to request the service :

sudo firewall-cmd --permanent --add-service=http
[root@centos ~]# firewall-cmd --permanent --add-service=http
success
[root@hostname ~]#

Reload the firewall service so that the already defined and executed rule in the above command can be implemented by executing the following command :

sudo systemctl reload firewalld

The above command execution is shown as follows :

[root@centos ~]# systemctl reload firewalld

5. Install Gitlab by using one of several way described below which is doing the Gitlab installation process using repository by adding the repository itself using script. Download the script first by executing the following command in the bash prompt :

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

After successfully install the Gitlab repository, prove the existence by executing the following command :

[root@hostname ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                                             repo name
!base/7/x86_64                                      CentOS-7 - Base
!extras/7/x86_64                                    CentOS-7 - Extra
!gitlab_gitlab-ce/x86_64                            gitlab_gitlab-ce
!gitlab_gitlab-ce-source                            gitlab_gitlab-ce-source
repolist:10,391                                     
[root@hostname ~]
sudo yum install gitlab-ce

Another option which can be used for an alternative if the installation through repository is not comforting enough through a piped script, just find the entire script here and select and download the package manually and install using the following command :

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-XXX.rpm/download

After finish on downloading the rpm file, execute the downloaded file to install gitlab using rpm command :

rpm -i gitlab-ce-XXX.rpm

Below is the process in installing Gitlab repository so that the installation of Gitlab can be proceeded by using the help of yum utility package manager :

[root@centos ~]# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
Detected operating system as centos/7.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.repo?os=centos&dist=7&source=script
done.
Installing pygpgme to verify GPG signatures...
Loaded plugins: fastestmirror
gitlab_gitlab-ce-source/signature | 836 B 00:00:00
Retrieving key from https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
Importing GPG key 0xE15E78F4:
Userid : "GitLab B.V. (package repository signing key) <[email protected]>"
Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4
From : https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
gitlab_gitlab-ce-source/signature | 951 B 00:00:00 !!!
gitlab_gitlab-ce-source/primary | 175 B 00:00:02
Loading mirror speeds from cached hostfile
Package pygpgme-0.3-9.el7.x86_64 already installed and latest version
Nothing to do
Installing yum-utils...
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-40.el7 will be installed
--> Processing Dependency: yum >= 3.4.3-143 for package: yum-utils-1.1.31-40.el7.noarch
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-40.el7.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-40.el7.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
---> Package yum.noarch 0:3.4.3-132.el7.centos.0.1 will be updated
---> Package yum.noarch 0:3.4.3-150.el7.centos will be an update
--> Processing Dependency: python-urlgrabber >= 3.10-8 for package: yum-3.4.3-150.el7.centos.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-1.el7_1 will be installed
---> Package python-urlgrabber.noarch 0:3.10-7.el7 will be updated
---> Package python-urlgrabber.noarch 0:3.10-8.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================================
Installing:
yum-utils noarch 1.1.31-40.el7 base 116 k
Installing for dependencies:
libxml2-python x86_64 2.9.1-6.el7_2.3 base 247 k
python-chardet noarch 2.2.1-1.el7_1 base 227 k
python-kitchen noarch 1.1.1-5.el7 base 267 k
Updating for dependencies:
python-urlgrabber noarch 3.10-8.el7 base 108 k
yum noarch 3.4.3-150.el7.centos base 1.2 M
Transaction Summary
========================================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Upgrade ( 2 Dependent packages)
Total download size: 2.2 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm | 247 kB 00:00:00
(2/6): python-chardet-2.2.1-1.el7_1.noarch.rpm | 227 kB 00:00:00
(3/6): python-urlgrabber-3.10-8.el7.noarch.rpm | 108 kB 00:00:00
(4/6): python-kitchen-1.1.1-5.el7.noarch.rpm | 267 kB 00:00:00
(5/6): yum-utils-1.1.31-40.el7.noarch.rpm | 116 kB 00:00:00
(6/6): yum-3.4.3-150.el7.centos.noarch.rpm | 1.2 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.2 MB/s | 2.2 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : python-urlgrabber-3.10-8.el7.noarch 1/8
Updating : yum-3.4.3-150.el7.centos.noarch 2/8
Installing : python-chardet-2.2.1-1.el7_1.noarch 3/8
Installing : python-kitchen-1.1.1-5.el7.noarch 4/8
Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64 5/8
Installing : yum-utils-1.1.31-40.el7.noarch 6/8
Cleanup : yum-3.4.3-132.el7.centos.0.1.noarch 7/8
Cleanup : python-urlgrabber-3.10-7.el7.noarch 8/8
Verifying : yum-utils-1.1.31-40.el7.noarch 1/8
Verifying : libxml2-python-2.9.1-6.el7_2.3.x86_64 2/8
Verifying : python-chardet-2.2.1-1.el7_1.noarch 3/8
Verifying : yum-3.4.3-150.el7.centos.noarch 4/8
Verifying : python-kitchen-1.1.1-5.el7.noarch 5/8
Verifying : python-urlgrabber-3.10-8.el7.noarch 6/8
Verifying : yum-3.4.3-132.el7.centos.0.1.noarch 7/8
Verifying : python-urlgrabber-3.10-7.el7.noarch 8/8
Installed:
yum-utils.noarch 0:1.1.31-40.el7
Dependency Installed:
libxml2-python.x86_64 0:2.9.1-6.el7_2.3 python-chardet.noarch 0:2.2.1-1.el7_1 python-kitchen.noarch 0:1.1.1-5.el7
Dependency Updated:
python-urlgrabber.noarch 0:3.10-8.el7 yum.noarch 0:3.4.3-150.el7.centos
Complete!
Generating yum cache for gitlab_gitlab-ce...
Importing GPG key 0xE15E78F4:
Userid : "GitLab B.V. (package repository signing key) <[email protected]>"
Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4
From : https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
The repository is setup! You can now install packages.
[root@centos ~]#
6. Start installing Gitlab by executing the following command : 
[root@hostname ~]# yum install gitlab-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:8.14.5-ce.0.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================================
Installing:
gitlab-ce x86_64 8.14.5-ce.0.el7 gitlab_gitlab-ce 301 M
Transaction Summary
=====================================================================================================================================================================================================================
Install 1 Package
Total download size: 301 M
Installed size: 818 M
Is this ok [y/d/N]: y
Downloading packages:
gitlab-ce-8.14.5-ce.0.el7.x86_64.rpm | 301 MB 00:43:38
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : gitlab-ce-8.14.5-ce.0.el7.x86_64 1/1
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:
sudo gitlab-ctl reconfigure
gitlab: GitLab should be reachable at http://centos
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
It looks like GitLab has not been configured yet; skipping the upgrade script.
Verifying : gitlab-ce-8.14.5-ce.0.el7.x86_64 1/1
Installed:
gitlab-ce.x86_64 0:8.14.5-ce.0.el7
Complete!
[root@hostname ~]#

6. After successfully installing Gitlab, run the following command to configure and start running it :

sudo gitlab-ctl reconfigure

Below is part of the output of the command’s execution in order to configure and start Gitlab’s service :

[root@hostname ~]# gitlab-ctl reconfigure
...
-> 0.0392s
-- add_index("users", ["name"], {:name=>"index_users_on_name_trigram", :using=>:gin, :opclasses=>{"name"=>"gin_trgm_ops"}})
-> 0.0124s
-- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true, :using=>:btree})
-> 0.0365s
-- add_index("users", ["state"], {:name=>"index_users_on_state", :using=>:btree})
-> 0.0293s
-- add_index("users", ["username"], {:name=>"index_users_on_username", :using=>:btree})
-> 0.0469s
-- add_index("users", ["username"], {:name=>"index_users_on_username_trigram", :using=>:gin, :opclasses=>{"username"=>"gin_trgm_ops"}})
-> 0.0123s
-- create_table("users_star_projects", {:force=>:cascade})
-> 0.0335s
-- add_index("users_star_projects", ["project_id"], {:name=>"index_users_star_projects_on_project_id", :using=>:btree})
-> 0.0574s
-- add_index("users_star_projects", ["user_id", "project_id"], {:name=>"index_users_star_projects_on_user_id_and_project_id", :unique=>true, :using=>:btree})
-> 0.0406s
-- add_index("users_star_projects", ["user_id"], {:name=>"index_users_star_projects_on_user_id", :using=>:btree})
-> 0.0331s
-- create_table("web_hooks", {:force=>:cascade})
-> 0.0589s
-- add_index("web_hooks", ["project_id"], {:name=>"index_web_hooks_on_project_id", :using=>:btree})
-> 0.0356s
-- add_foreign_key("boards", "projects")
-> 0.0141s
-- add_foreign_key("issue_metrics", "issues", {:on_delete=>:cascade})
-> 0.0118s
-- add_foreign_key("label_priorities", "labels", {:on_delete=>:cascade})
-> 0.0118s
-- add_foreign_key("label_priorities", "projects", {:on_delete=>:cascade})
-> 0.0063s
-- add_foreign_key("labels", "namespaces", {:column=>"group_id", :on_delete=>:cascade})
-> 0.0120s
-- add_foreign_key("lists", "boards")
-> 0.0148s
-- add_foreign_key("lists", "labels")
-> 0.0058s
-- add_foreign_key("merge_request_metrics", "ci_commits", {:column=>"pipeline_id", :on_delete=>:cascade})
-> 0.0122s
-- add_foreign_key("merge_request_metrics", "merge_requests", {:on_delete=>:cascade})
-> 0.0121s
-- add_foreign_key("merge_requests_closing_issues", "issues", {:on_delete=>:cascade})
-> 0.0060s
-- add_foreign_key("merge_requests_closing_issues", "merge_requests", {:on_delete=>:cascade})
-> 0.0125s
-- add_foreign_key("personal_access_tokens", "users")
-> 0.0124s
-- add_foreign_key("project_authorizations", "projects", {:on_delete=>:cascade})
-> 0.0063s
-- add_foreign_key("project_authorizations", "users", {:on_delete=>:cascade})
-> 0.0121s
-- add_foreign_key("protected_branch_merge_access_levels", "protected_branches")
-> 0.0121s
-- add_foreign_key("protected_branch_push_access_levels", "protected_branches")
-> 0.0059s
-- add_foreign_key("subscriptions", "projects", {:on_delete=>:cascade})
-> 0.0121s
-- add_foreign_key("trending_projects", "projects", {:on_delete=>:cascade})
-> 0.0197s
-- add_foreign_key("u2f_registrations", "users")
-> 0.0118s
-- initialize_schema_migrations_table()
-> 0.0675s
== Seed from /opt/gitlab/embedded/service/gitlab-rails/db/fixtures/production/001_admin.rb
Administrator account created:
login: root
password: You'll be prompted to create one on your first visit.
- execute "bash" "/tmp/chef-script20161216-11498-ocsz8y"
Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run
- execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: gitlab::logrotate_folders_and_configs
* directory[/var/opt/gitlab/logrotate] action create
- create new directory /var/opt/gitlab/logrotate
- change mode from '' to '0700'
- restore selinux security context
* directory[/var/opt/gitlab/logrotate/logrotate.d] action create
- create new directory /var/opt/gitlab/logrotate/logrotate.d
- change mode from '' to '0700'
- restore selinux security context
* directory[/var/log/gitlab/logrotate] action create
- create new directory /var/log/gitlab/logrotate
- change mode from '' to '0700'
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.conf] action create
- create new file /var/opt/gitlab/logrotate/logrotate.conf
- update content in file /var/opt/gitlab/logrotate/logrotate.conf from none to 378c95
--- /var/opt/gitlab/logrotate/logrotate.conf 2016-12-16 16:24:05.977000000 +0700
+++ /var/opt/gitlab/logrotate/.chef-logrotate.conf20161216-11498-1w4i0e 2016-12-16 16:24:05.977000000 +0700
@@ -1 +1,10 @@
+# Generated by 'gitlab-ctl reconfigure'.
+# Modifications will be overwritten!
+
+include /var/opt/gitlab/logrotate/logrotate.d/nginx
+include /var/opt/gitlab/logrotate/logrotate.d/unicorn
+include /var/opt/gitlab/logrotate/logrotate.d/gitlab-rails
+include /var/opt/gitlab/logrotate/logrotate.d/gitlab-shell
+include /var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse
+include /var/opt/gitlab/logrotate/logrotate.d/gitlab-pages
- change mode from '' to '0644'
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/nginx] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/nginx
- update content in file /var/opt/gitlab/logrotate/logrotate.d/nginx from none to b0c555
--- /var/opt/gitlab/logrotate/logrotate.d/nginx 2016-12-16 16:24:06.002000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-nginx20161216-11498-1b0u6ks 2016-12-16 16:24:06.002000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/nginx/*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/unicorn] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/unicorn
- update content in file /var/opt/gitlab/logrotate/logrotate.d/unicorn from none to 1520c7
--- /var/opt/gitlab/logrotate/logrotate.d/unicorn 2016-12-16 16:24:06.032000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-unicorn20161216-11498-16p5zq 2016-12-16 16:24:06.032000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/unicorn/*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-rails] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/gitlab-rails
- update content in file /var/opt/gitlab/logrotate/logrotate.d/gitlab-rails from none to f44586
--- /var/opt/gitlab/logrotate/logrotate.d/gitlab-rails 2016-12-16 16:24:06.067000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-gitlab-rails20161216-11498-sj9sd0 2016-12-16 16:24:06.067000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/gitlab-rails/*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-shell] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/gitlab-shell
- update content in file /var/opt/gitlab/logrotate/logrotate.d/gitlab-shell from none to d12268
--- /var/opt/gitlab/logrotate/logrotate.d/gitlab-shell 2016-12-16 16:24:06.096000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-gitlab-shell20161216-11498-awl419 2016-12-16 16:24:06.096000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/gitlab-shell//*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse
- update content in file /var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse from none to 359431
--- /var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse 2016-12-16 16:24:06.629000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-gitlab-workhorse20161216-11498-1b1ayr7 2016-12-16 16:24:06.628000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/gitlab-workhorse/*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
* template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-pages] action create
- create new file /var/opt/gitlab/logrotate/logrotate.d/gitlab-pages
- update content in file /var/opt/gitlab/logrotate/logrotate.d/gitlab-pages from none to 3a241b
--- /var/opt/gitlab/logrotate/logrotate.d/gitlab-pages 2016-12-16 16:24:06.668000000 +0700
+++ /var/opt/gitlab/logrotate/logrotate.d/.chef-gitlab-pages20161216-11498-6k36z 2016-12-16 16:24:06.668000000 +0700
@@ -1 +1,15 @@
+# Generated by gitlab-ctl reconfigure
+# Modifications will be overwritten!
+
+/var/log/gitlab/gitlab-pages/*.log {
+ daily
+
+ rotate 30
+ compress
+ copytruncate
+ missingok
+ postrotate
+
+ endscript
+}
- restore selinux security context
Recipe: gitlab::unicorn
* directory[/var/log/gitlab/unicorn] action create
- create new directory /var/log/gitlab/unicorn
- change mode from '' to '0700'
- change owner from '' to 'git'
- restore selinux security context
* directory[/opt/gitlab/var/unicorn] action create
- create new directory /opt/gitlab/var/unicorn
- change mode from '' to '0700'
- change owner from '' to 'git'
- restore selinux security context
* directory[/var/opt/gitlab/gitlab-rails/sockets] action create
- create new directory /var/opt/gitlab/gitlab-rails/sockets
- change mode from '' to '0750'
- change owner from '' to 'git'
- change group from '' to 'gitlab-www'
- restore selinux security context
* directory[/var/opt/gitlab/gitlab-rails/etc] action create (up to date)
* template[/var/opt/gitlab/gitlab-rails/etc/unicorn.rb] action create
- create new file /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
- update content in file /var/opt/gitlab/gitlab-rails/etc/unicorn.rb from none to ca454b
--- /var/opt/gitlab/gitlab-rails/etc/unicorn.rb 2016-12-16 16:24:06.762000000 +0700
+++ /var/opt/gitlab/gitlab-rails/etc/.chef-unicorn.rb20161216-11498-17cu155 2016-12-16 16:24:06.762000000 +0700
@@ -1 +1,49 @@
+# This file is managed by gitlab-ctl. Manual changes will be
+# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
+# and run `sudo gitlab-ctl reconfigure`.
+
+
+# What ports/sockets to listen on, and what options for them.
+listen "127.0.0.1:8080", :tcp_nopush => true
+listen "/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket", :backlog => 1024
+
+working_directory '/var/opt/gitlab/gitlab-rails/working'
+
+# What the timeout for killing busy workers is, in seconds
+timeout 60
+
+# Whether the app should be pre-loaded
+preload_app true
+
+# How many worker processes
+worker_processes 3
+
+# What to do before we fork a worker
+before_fork do |server, worker|
+ old_pid = "#{server.config[:pid]}.oldbin"
+ if old_pid != server.pid
+ begin
+ sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
+ Process.kill(sig, File.read(old_pid).to_i)
+ rescue Errno::ENOENT, Errno::ESRCH
+ end
+ end
+
+end
+
+# Where to drop a pidfile
+pid '/opt/gitlab/var/unicorn/unicorn.pid'
+
+# Where stderr gets logged
+stderr_path '/var/log/gitlab/unicorn/unicorn_stderr.log'
+
+# Where stdout gets logged
+stdout_path '/var/log/gitlab/unicorn/unicorn_stdout.log'
+
+# Min memory size (RSS) per worker
+ENV['GITLAB_UNICORN_MEMORY_MIN'] = (400 * 1 << 20).to_s
+
+# Max memory size (RSS) per worker
+ENV['GITLAB_UNICORN_MEMORY_MAX'] = (650 * 1 << 20).to_s
+
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/unicorn] action create
- create new directory /opt/gitlab/sv/unicorn
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/unicorn/log] action create
- create new directory /opt/gitlab/sv/unicorn/log
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/unicorn/log/main] action create
- create new directory /opt/gitlab/sv/unicorn/log/main
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/unicorn/run] action create
- create new file /opt/gitlab/sv/unicorn/run
- update content in file /opt/gitlab/sv/unicorn/run from none to 580ca8
--- /opt/gitlab/sv/unicorn/run 2016-12-16 16:24:06.859000000 +0700
+++ /opt/gitlab/sv/unicorn/.chef-run20161216-11498-1e3ib7 2016-12-16 16:24:06.859000000 +0700
@@ -1 +1,16 @@
+#!/bin/bash
+
+# Let runit capture all script error messages
+exec 2>&1
+
+
+
+exec chpst -P -u git \
+ /usr/bin/env \
+ current_pidfile=/opt/gitlab/var/unicorn/unicorn.pid \
+ rails_app=gitlab-rails \
+ user=git \
+ environment=production \
+ unicorn_rb=/var/opt/gitlab/gitlab-rails/etc/unicorn.rb \
+ /opt/gitlab/embedded/bin/gitlab-unicorn-wrapper
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/unicorn/log/run] action create
- create new file /opt/gitlab/sv/unicorn/log/run
- update content in file /opt/gitlab/sv/unicorn/log/run from none to d50262
--- /opt/gitlab/sv/unicorn/log/run 2016-12-16 16:24:06.885000000 +0700
+++ /opt/gitlab/sv/unicorn/log/.chef-run20161216-11498-juexxg 2016-12-16 16:24:06.885000000 +0700
@@ -1 +1,3 @@
+#!/bin/sh
+exec svlogd -tt /var/log/gitlab/unicorn
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/log/gitlab/unicorn/config] action create
- create new file /var/log/gitlab/unicorn/config
- update content in file /var/log/gitlab/unicorn/config from none to 623c00
--- /var/log/gitlab/unicorn/config 2016-12-16 16:24:06.910000000 +0700
+++ /var/log/gitlab/unicorn/.chef-config20161216-11498-61g61i 2016-12-16 16:24:06.910000000 +0700
@@ -1 +1,7 @@
+s209715200
+n30
+t86400
+!gzip
+
+
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* ruby_block[reload unicorn svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/unicorn/down] action delete (up to date)
* directory[/opt/gitlab/sv/unicorn/control] action create
- create new directory /opt/gitlab/sv/unicorn/control
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/unicorn/control/t] action create
- create new file /opt/gitlab/sv/unicorn/control/t
- update content in file /opt/gitlab/sv/unicorn/control/t from none to 84b233
--- /opt/gitlab/sv/unicorn/control/t 2016-12-16 16:24:06.959000000 +0700
+++ /opt/gitlab/sv/unicorn/control/.chef-t20161216-11498-u4degk 2016-12-16 16:24:06.959000000 +0700
@@ -1 +1,4 @@
+#!/bin/sh
+echo "Received TERM from runit, sending to process group (-PID)"
+kill -- -$(cat /opt/gitlab/service/unicorn/supervise/pid)
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* link[/opt/gitlab/init/unicorn] action create
- create symlink at /opt/gitlab/init/unicorn to /opt/gitlab/embedded/bin/sv
* link[/opt/gitlab/service/unicorn] action create
- create symlink at /opt/gitlab/service/unicorn to /opt/gitlab/sv/unicorn
* ruby_block[supervise_unicorn_sleep] action run
- execute the ruby block supervise_unicorn_sleep
* service[unicorn] action nothing (skipped due to action :nothing)
* execute[/opt/gitlab/bin/gitlab-ctl start unicorn] action run
[execute] ok: run: unicorn: (pid 12667) 1s
- execute /opt/gitlab/bin/gitlab-ctl start unicorn
* directory[create /etc/sysctl.d for net.core.somaxconn] action create (up to date)
* file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf net.core.somaxconn] action create
- create new file /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf
- update content in file /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf from none to 353a75
--- /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf 2016-12-16 16:24:08.150000000 +0700
+++ /opt/gitlab/embedded/etc/.chef-90-omnibus-gitlab-net.core.somaxconn.conf net.core.somaxconn20161216-11498-lottju 2016-12-16 16:24:08.149000000 +0700
@@ -1 +1,2 @@
+net.core.somaxconn = 1024
- restore selinux security context
* execute[load sysctl conf net.core.somaxconn] action run
[execute] kernel.sem = 250 32000 32 262
kernel.shmall = 4194304
kernel.shmmax = 17179869184
- execute cat /etc/sysctl.conf /etc/sysctl.d/*.conf | sysctl -e -p -
* link[/etc/sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf] action create
- create symlink at /etc/sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf to /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf
* file[delete /etc/sysctl.d/90-postgresql.conf net.core.somaxconn] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-unicorn.conf net.core.somaxconn] action delete (skipped due to only_if)
* file[delete /opt/gitlab/embedded/etc/90-omnibus-gitlab.conf net.core.somaxconn] action delete (skipped due to only_if)
* file[delete /etc/sysctl.d/90-omnibus-gitlab.conf net.core.somaxconn] action delete (skipped due to only_if)
* execute[load sysctl conf net.core.somaxconn] action nothing (skipped due to action :nothing)
Recipe: gitlab::sidekiq
* directory[/var/log/gitlab/sidekiq] action create
- create new directory /var/log/gitlab/sidekiq
- change mode from '' to '0700'
- change owner from '' to 'git'
- restore selinux security context
* directory[/opt/gitlab/sv/sidekiq] action create
- create new directory /opt/gitlab/sv/sidekiq
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/sidekiq/log] action create
- create new directory /opt/gitlab/sv/sidekiq/log
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/sidekiq/log/main] action create
- create new directory /opt/gitlab/sv/sidekiq/log/main
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/sidekiq/run] action create
- create new file /opt/gitlab/sv/sidekiq/run
- update content in file /opt/gitlab/sv/sidekiq/run from none to 4bc8af
--- /opt/gitlab/sv/sidekiq/run 2016-12-16 16:24:08.338000000 +0700
+++ /opt/gitlab/sv/sidekiq/.chef-run20161216-11498-730378 2016-12-16 16:24:08.338000000 +0700
@@ -1 +1,15 @@
+#!/bin/sh
+
+cd /var/opt/gitlab/gitlab-rails/working
+
+exec 2>&1
+
+exec chpst -e /opt/gitlab/etc/gitlab-rails/env -P \
+ -U git -u git \
+ /opt/gitlab/embedded/bin/bundle exec sidekiq \
+ -C /opt/gitlab/embedded/service/gitlab-rails/config/sidekiq_queues.yml \
+ -e production \
+ -r /opt/gitlab/embedded/service/gitlab-rails \
+ -t 4 \
+ -c 25
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/sidekiq/log/run] action create
- create new file /opt/gitlab/sv/sidekiq/log/run
- update content in file /opt/gitlab/sv/sidekiq/log/run from none to 051d8f
--- /opt/gitlab/sv/sidekiq/log/run 2016-12-16 16:24:08.366000000 +0700
+++ /opt/gitlab/sv/sidekiq/log/.chef-run20161216-11498-fy4nym 2016-12-16 16:24:08.366000000 +0700
@@ -1 +1,3 @@
+#!/bin/sh
+exec svlogd -tt /var/log/gitlab/sidekiq
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/log/gitlab/sidekiq/config] action create
- create new file /var/log/gitlab/sidekiq/config
- update content in file /var/log/gitlab/sidekiq/config from none to 623c00
--- /var/log/gitlab/sidekiq/config 2016-12-16 16:24:08.396000000 +0700
+++ /var/log/gitlab/sidekiq/.chef-config20161216-11498-1ko4jyl 2016-12-16 16:24:08.394000000 +0700
@@ -1 +1,7 @@
+s209715200
+n30
+t86400
+!gzip
+
+
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* ruby_block[reload sidekiq svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/sidekiq/down] action delete (up to date)
* link[/opt/gitlab/init/sidekiq] action create
- create symlink at /opt/gitlab/init/sidekiq to /opt/gitlab/embedded/bin/sv
* link[/opt/gitlab/service/sidekiq] action create
- create symlink at /opt/gitlab/service/sidekiq to /opt/gitlab/sv/sidekiq
* ruby_block[supervise_sidekiq_sleep] action run
- execute the ruby block supervise_sidekiq_sleep
* service[sidekiq] action nothing (skipped due to action :nothing)
* execute[/opt/gitlab/bin/gitlab-ctl start sidekiq] action run
[execute] ok: run: sidekiq: (pid 12722) 0s
- execute /opt/gitlab/bin/gitlab-ctl start sidekiq
Recipe: gitlab::gitlab-workhorse
* directory[/var/opt/gitlab/gitlab-workhorse] action create
- create new directory /var/opt/gitlab/gitlab-workhorse
- change mode from '' to '0750'
- change owner from '' to 'git'
- change group from '' to 'gitlab-www'
- restore selinux security context
* directory[/var/log/gitlab/gitlab-workhorse] action create
- create new directory /var/log/gitlab/gitlab-workhorse
- change mode from '' to '0700'
- change owner from '' to 'git'
- restore selinux security context
* directory[/opt/gitlab/etc/gitlab-workhorse] action create
- create new directory /opt/gitlab/etc/gitlab-workhorse
- change mode from '' to '0700'
- change owner from '' to 'git'
- restore selinux security context
* directory[/opt/gitlab/etc/gitlab-workhorse/env] action create
- create new directory /opt/gitlab/etc/gitlab-workhorse/env
- restore selinux security context
* file[/opt/gitlab/etc/gitlab-workhorse/env/PATH] action create
- create new file /opt/gitlab/etc/gitlab-workhorse/env/PATH
- update content in file /opt/gitlab/etc/gitlab-workhorse/env/PATH from none to d5dc07
--- /opt/gitlab/etc/gitlab-workhorse/env/PATH 2016-12-16 16:24:13.705000000 +0700
+++ /opt/gitlab/etc/gitlab-workhorse/env/.chef-PATH20161216-11498-2iukci 2016-12-16 16:24:13.705000000 +0700
@@ -1 +1,2 @@
+/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin
- restore selinux security context
* file[/opt/gitlab/etc/gitlab-workhorse/env/HOME] action create
- create new file /opt/gitlab/etc/gitlab-workhorse/env/HOME
- update content in file /opt/gitlab/etc/gitlab-workhorse/env/HOME from none to 205bb9
--- /opt/gitlab/etc/gitlab-workhorse/env/HOME 2016-12-16 16:24:13.735000000 +0700
+++ /opt/gitlab/etc/gitlab-workhorse/env/.chef-HOME20161216-11498-1h2a6br 2016-12-16 16:24:13.734000000 +0700
@@ -1 +1,2 @@
+/var/opt/gitlab
- restore selinux security context
* directory[/opt/gitlab/sv/gitlab-workhorse] action create
- create new directory /opt/gitlab/sv/gitlab-workhorse
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/gitlab-workhorse/log] action create
- create new directory /opt/gitlab/sv/gitlab-workhorse/log
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/gitlab-workhorse/log/main] action create
- create new directory /opt/gitlab/sv/gitlab-workhorse/log/main
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/gitlab-workhorse/run] action create
- create new file /opt/gitlab/sv/gitlab-workhorse/run
- update content in file /opt/gitlab/sv/gitlab-workhorse/run from none to 09dfef
--- /opt/gitlab/sv/gitlab-workhorse/run 2016-12-16 16:24:13.845000000 +0700
+++ /opt/gitlab/sv/gitlab-workhorse/.chef-run20161216-11498-1trg8x1 2016-12-16 16:24:13.845000000 +0700
@@ -1 +1,25 @@
+#!/bin/sh
+set -e # fail on errors
+
+# Redirect stderr -> stdout
+exec 2>&1
+
+
+
+cd /var/opt/gitlab/gitlab-workhorse
+
+exec chpst -e /opt/gitlab/etc/gitlab-workhorse/env -P \
+ -U git \
+ -u git \
+ /opt/gitlab/embedded/bin/gitlab-workhorse \
+ -listenNetwork unix \
+ -listenUmask 0 \
+ -listenAddr /var/opt/gitlab/gitlab-workhorse/socket \
+ -authBackend http://localhost:8080 \
+ -authSocket /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket \
+ -documentRoot /opt/gitlab/embedded/service/gitlab-rails/public \
+ -pprofListenAddr ''\
+ -secretPath /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret \
+
+# Do not remove this line; it prevents trouble with the trailing backslashes above.
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/gitlab-workhorse/log/run] action create
- create new file /opt/gitlab/sv/gitlab-workhorse/log/run
- update content in file /opt/gitlab/sv/gitlab-workhorse/log/run from none to 6ed0e1
--- /opt/gitlab/sv/gitlab-workhorse/log/run 2016-12-16 16:24:13.874000000 +0700
+++ /opt/gitlab/sv/gitlab-workhorse/log/.chef-run20161216-11498-91wmfv 2016-12-16 16:24:13.874000000 +0700
@@ -1 +1,3 @@
+#!/bin/sh
+exec svlogd -tt /var/log/gitlab/gitlab-workhorse
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/log/gitlab/gitlab-workhorse/config] action create
- create new file /var/log/gitlab/gitlab-workhorse/config
- update content in file /var/log/gitlab/gitlab-workhorse/config from none to 623c00
--- /var/log/gitlab/gitlab-workhorse/config 2016-12-16 16:24:13.902000000 +0700
+++ /var/log/gitlab/gitlab-workhorse/.chef-config20161216-11498-eiftq5 2016-12-16 16:24:13.901000000 +0700
@@ -1 +1,7 @@
+s209715200
+n30
+t86400
+!gzip
+
+
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* ruby_block[reload gitlab-workhorse svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/gitlab-workhorse/down] action delete (up to date)
* link[/opt/gitlab/init/gitlab-workhorse] action create
- create symlink at /opt/gitlab/init/gitlab-workhorse to /opt/gitlab/embedded/bin/sv
* link[/opt/gitlab/service/gitlab-workhorse] action create
- create symlink at /opt/gitlab/service/gitlab-workhorse to /opt/gitlab/sv/gitlab-workhorse
* ruby_block[supervise_gitlab-workhorse_sleep] action run
- execute the ruby block supervise_gitlab-workhorse_sleep
* service[gitlab-workhorse] action nothing (skipped due to action :nothing)
* file[/var/opt/gitlab/gitlab-workhorse/VERSION] action create
- create new file /var/opt/gitlab/gitlab-workhorse/VERSION
- update content in file /var/opt/gitlab/gitlab-workhorse/VERSION from none to 5c5408
--- /var/opt/gitlab/gitlab-workhorse/VERSION 2016-12-16 16:24:14.935000000 +0700
+++ /var/opt/gitlab/gitlab-workhorse/.chef-VERSION20161216-11498-12iq5l1 2016-12-16 16:24:14.935000000 +0700
@@ -1 +1,2 @@
+gitlab-workhorse v1.1.1-20161214.204906
- restore selinux security context
Recipe: gitlab::mailroom_disable
* link[/opt/gitlab/service/mailroom] action delete (up to date)
* directory[/opt/gitlab/sv/mailroom] action delete (up to date)
Recipe: gitlab::nginx
* directory[/var/opt/gitlab/nginx] action create
- create new directory /var/opt/gitlab/nginx
- change mode from '' to '0750'
- change owner from '' to 'root'
- change group from '' to 'gitlab-www'
- restore selinux security context
* directory[/var/opt/gitlab/nginx/conf] action create
- create new directory /var/opt/gitlab/nginx/conf
- change mode from '' to '0750'
- change owner from '' to 'root'
- change group from '' to 'gitlab-www'
- restore selinux security context
* directory[/var/log/gitlab/nginx] action create
- create new directory /var/log/gitlab/nginx
- change mode from '' to '0750'
- change owner from '' to 'root'
- change group from '' to 'gitlab-www'
- restore selinux security context
* link[/var/opt/gitlab/nginx/logs] action create
- create symlink at /var/opt/gitlab/nginx/logs to /var/log/gitlab/nginx
* template[/var/opt/gitlab/nginx/conf/gitlab-http.conf] action create
- create new file /var/opt/gitlab/nginx/conf/gitlab-http.conf
- update content in file /var/opt/gitlab/nginx/conf/gitlab-http.conf from none to 54f20b
--- /var/opt/gitlab/nginx/conf/gitlab-http.conf 2016-12-16 16:24:15.062000000 +0700
+++ /var/opt/gitlab/nginx/conf/.chef-gitlab-http.conf20161216-11498-72pmky 2016-12-16 16:24:15.061000000 +0700
@@ -1 +1,87 @@
+# This file is managed by gitlab-ctl. Manual changes will be
+# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
+# and run `sudo gitlab-ctl reconfigure`.
+
+## GitLab
+## Modified from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab-ssl & https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab
+##
+## Lines starting with two hashes (##) are comments with information.
+## Lines starting with one hash (#) are configuration parameters that can be uncommented.
+##
+##################################
+## CHUNKED TRANSFER ##
+##################################
+##
+## It is a known issue that Git-over-HTTP requires chunked transfer encoding [0]
+## which is not supported by Nginx < 1.3.9 [1]. As a result, pushing a large object
+## with Git (i.e. a single large file) can lead to a 411 error. In theory you can get
+## around this by tweaking this configuration file and either:
+## - installing an old version of Nginx with the chunkin module [2] compiled in, or
+## - using a newer version of Nginx.
+##
+## At the time of writing we do not know if either of these theoretical solutions works.
+## As a workaround users can use Git over SSH to push large files.
+##
+## [0] https://git.kernel.org/cgit/git/git.git/tree/Documentation/technical/http-protocol.txt#n99
+## [1] https://github.com/agentzh/chunkin-nginx-module#status
+## [2] https://github.com/agentzh/chunkin-nginx-module
+##
+###################################
+## configuration ##
+###################################
+
+upstream gitlab-workhorse {
+ server unix:/var/opt/gitlab/gitlab-workhorse/socket;
+}
+
+
+server {
+ listen *:80;
+
+
+ server_name centos;
+ server_tokens off; ## Don't show the nginx version number, a security best practice
+
+ ## Increase this if you want to upload large attachments
+ ## Or if you want to accept large git objects over http
+ client_max_body_size 0;
+
+
+ ## Real IP Module Config
+ ## http://nginx.org/en/docs/http/ngx_http_realip_module.html
+
+ ## Individual nginx logs for this GitLab vhost
+ access_log /var/log/gitlab/nginx/gitlab_access.log gitlab_access;
+ error_log /var/log/gitlab/nginx/gitlab_error.log;
+
+ location / {
+ ## If you use HTTPS make sure you disable gzip compression
+ ## to be safe against BREACH attack.
+
+
+ ## https://github.com/gitlabhq/gitlabhq/issues/694
+ ## Some requests take more than 30 seconds.
+ proxy_read_timeout 3600;
+ proxy_connect_timeout 300;
+ proxy_redirect off;
+ proxy_http_version 1.1;
+
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto http;
+
+ proxy_pass http://gitlab-workhorse;
+ }
+ error_page 404 /404.html;
+ error_page 422 /422.html;
+ error_page 500 /500.html;
+ error_page 502 /502.html;
+ location ~ ^/(404|422|500|502)(-custom)?\.html$ {
+ root /opt/gitlab/embedded/service/gitlab-rails/public;
+ internal;
+ }
+
+
+}
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/opt/gitlab/nginx/conf/gitlab-pages.conf] action delete (up to date)
* template[/var/opt/gitlab/nginx/conf/gitlab-registry.conf] action delete (up to date)
* template[/var/opt/gitlab/nginx/conf/gitlab-mattermost-http.conf] action delete (up to date)
* template[/var/opt/gitlab/nginx/conf/nginx-status.conf] action create
- create new file /var/opt/gitlab/nginx/conf/nginx-status.conf
- update content in file /var/opt/gitlab/nginx/conf/nginx-status.conf from none to bee808
--- /var/opt/gitlab/nginx/conf/nginx-status.conf 2016-12-16 16:24:15.105000000 +0700
+++ /var/opt/gitlab/nginx/conf/.chef-nginx-status.conf20161216-11498-zjqrin 2016-12-16 16:24:15.104000000 +0700
@@ -1 +1,12 @@
+server {
+ listen *:8060;
+ server_name localhost;
+ location /nginx_status {
+ stub_status on;
+ server_tokens off;
+ access_log off;
+ allow 127.0.0.1;
+ deny all;
+ }
+}
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/opt/gitlab/nginx/conf/nginx.conf] action create
- create new file /var/opt/gitlab/nginx/conf/nginx.conf
- update content in file /var/opt/gitlab/nginx/conf/nginx.conf from none to 7c643e
--- /var/opt/gitlab/nginx/conf/nginx.conf 2016-12-16 16:24:15.141000000 +0700
+++ /var/opt/gitlab/nginx/conf/.chef-nginx.conf20161216-11498-1wff4tz 2016-12-16 16:24:15.141000000 +0700
@@ -1 +1,50 @@
+# This file is managed by gitlab-ctl. Manual changes will be
+# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
+# and run `sudo gitlab-ctl reconfigure`.
+
+user gitlab-www gitlab-www;
+worker_processes 4;
+error_log stderr;
+pid nginx.pid;
+
+daemon off;
+
+events {
+ worker_connections 10240;
+}
+
+http {
+ log_format gitlab_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
+ log_format gitlab_ci_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
+ log_format gitlab_mattermost_access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
+
+ server_names_hash_bucket_size 64;
+
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+
+ keepalive_timeout 65;
+
+ gzip on;
+ gzip_http_version 1.0;
+ gzip_comp_level 2;
+ gzip_proxied any;
+ gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
+
+ include /opt/gitlab/embedded/conf/mime.types;
+
+ proxy_cache_path proxy_cache keys_zone=gitlab:10m max_size=1g levels=1:2;
+ proxy_cache gitlab;
+
+ include /var/opt/gitlab/nginx/conf/gitlab-http.conf;
+
+
+
+
+
+ include /var/opt/gitlab/nginx/conf/nginx-status.conf;
+
+
+}
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/nginx] action create
- create new directory /opt/gitlab/sv/nginx
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/nginx/log] action create
- create new directory /opt/gitlab/sv/nginx/log
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/nginx/log/main] action create
- create new directory /opt/gitlab/sv/nginx/log/main
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/nginx/run] action create
- create new file /opt/gitlab/sv/nginx/run
- update content in file /opt/gitlab/sv/nginx/run from none to d75aea
--- /opt/gitlab/sv/nginx/run 2016-12-16 16:24:15.289000000 +0700
+++ /opt/gitlab/sv/nginx/.chef-run20161216-11498-pzik0g 2016-12-16 16:24:15.289000000 +0700
@@ -1 +1,6 @@
+#!/bin/sh
+exec 2>&1
+
+cd /var/opt/gitlab/nginx
+exec chpst -P /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/nginx/log/run] action create
- create new file /opt/gitlab/sv/nginx/log/run
- update content in file /opt/gitlab/sv/nginx/log/run from none to c70025
--- /opt/gitlab/sv/nginx/log/run 2016-12-16 16:24:15.337000000 +0700
+++ /opt/gitlab/sv/nginx/log/.chef-run20161216-11498-13vnex1 2016-12-16 16:24:15.336000000 +0700
@@ -1 +1,3 @@
+#!/bin/sh
+exec svlogd -tt /var/log/gitlab/nginx
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/log/gitlab/nginx/config] action create
- create new file /var/log/gitlab/nginx/config
- update content in file /var/log/gitlab/nginx/config from none to 623c00
--- /var/log/gitlab/nginx/config 2016-12-16 16:24:15.377000000 +0700
+++ /var/log/gitlab/nginx/.chef-config20161216-11498-vpbhf6 2016-12-16 16:24:15.376000000 +0700
@@ -1 +1,7 @@
+s209715200
+n30
+t86400
+!gzip
+
+
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* ruby_block[reload nginx svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/nginx/down] action delete (up to date)
* link[/opt/gitlab/init/nginx] action create
- create symlink at /opt/gitlab/init/nginx to /opt/gitlab/embedded/bin/sv
* link[/opt/gitlab/service/nginx] action create
- create symlink at /opt/gitlab/service/nginx to /opt/gitlab/sv/nginx
* ruby_block[supervise_nginx_sleep] action run
- execute the ruby block supervise_nginx_sleep
* service[nginx] action nothing (skipped due to action :nothing)
* execute[/opt/gitlab/bin/gitlab-ctl start nginx] action run
[execute] ok: run: nginx: (pid 12816) 0s
- execute /opt/gitlab/bin/gitlab-ctl start nginx
Recipe: gitlab::remote-syslog_disable
* link[/opt/gitlab/service/remote-syslog] action delete (up to date)
* directory[/opt/gitlab/sv/remote-syslog] action delete (up to date)
Recipe: gitlab::logrotate
* directory[/opt/gitlab/sv/logrotate] action create
- create new directory /opt/gitlab/sv/logrotate
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/logrotate/log] action create
- create new directory /opt/gitlab/sv/logrotate/log
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* directory[/opt/gitlab/sv/logrotate/log/main] action create
- create new directory /opt/gitlab/sv/logrotate/log/main
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/logrotate/run] action create
- create new file /opt/gitlab/sv/logrotate/run
- update content in file /opt/gitlab/sv/logrotate/run from none to 07f1b6
--- /opt/gitlab/sv/logrotate/run 2016-12-16 16:24:20.783000000 +0700
+++ /opt/gitlab/sv/logrotate/.chef-run20161216-11498-peauni 2016-12-16 16:24:20.783000000 +0700
@@ -1 +1,11 @@
+#!/bin/sh
+exec 2>&1
+
+cd /var/opt/gitlab/logrotate
+
+exec /opt/gitlab/embedded/bin/chpst -P /usr/bin/env \
+ dir=/var/opt/gitlab/logrotate \
+ pre_sleep=600 \
+ post_sleep=3000 \
+ /opt/gitlab/embedded/bin/gitlab-logrotate-wrapper
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/logrotate/log/run] action create
- create new file /opt/gitlab/sv/logrotate/log/run
- update content in file /opt/gitlab/sv/logrotate/log/run from none to 94afe6
--- /opt/gitlab/sv/logrotate/log/run 2016-12-16 16:24:20.825000000 +0700
+++ /opt/gitlab/sv/logrotate/log/.chef-run20161216-11498-166q5l5 2016-12-16 16:24:20.824000000 +0700
@@ -1 +1,3 @@
+#!/bin/sh
+exec svlogd -tt /var/log/gitlab/logrotate
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/var/log/gitlab/logrotate/config] action create
- create new file /var/log/gitlab/logrotate/config
- update content in file /var/log/gitlab/logrotate/config from none to 623c00
--- /var/log/gitlab/logrotate/config 2016-12-16 16:24:20.881000000 +0700
+++ /var/log/gitlab/logrotate/.chef-config20161216-11498-uhwm85 2016-12-16 16:24:20.881000000 +0700
@@ -1 +1,7 @@
+s209715200
+n30
+t86400
+!gzip
+
+
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* ruby_block[reload logrotate svlogd configuration] action nothing (skipped due to action :nothing)
* file[/opt/gitlab/sv/logrotate/down] action delete (up to date)
* directory[/opt/gitlab/sv/logrotate/control] action create
- create new directory /opt/gitlab/sv/logrotate/control
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* template[/opt/gitlab/sv/logrotate/control/t] action create
- create new file /opt/gitlab/sv/logrotate/control/t
- update content in file /opt/gitlab/sv/logrotate/control/t from none to 8fa3fa
--- /opt/gitlab/sv/logrotate/control/t 2016-12-16 16:24:20.967000000 +0700
+++ /opt/gitlab/sv/logrotate/control/.chef-t20161216-11498-16d1ljl 2016-12-16 16:24:20.966000000 +0700
@@ -1 +1,4 @@
+#!/bin/sh
+echo "Received TERM from runit, sending to process group (-PID)"
+kill -- -$(cat /opt/gitlab/service/logrotate/supervise/pid)
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
* link[/opt/gitlab/init/logrotate] action create
- create symlink at /opt/gitlab/init/logrotate to /opt/gitlab/embedded/bin/sv
* link[/opt/gitlab/service/logrotate] action create
- create symlink at /opt/gitlab/service/logrotate to /opt/gitlab/sv/logrotate
* ruby_block[supervise_logrotate_sleep] action run
- execute the ruby block supervise_logrotate_sleep
* service[logrotate] action nothing (skipped due to action :nothing)
* execute[/opt/gitlab/bin/gitlab-ctl start logrotate] action run
[execute] ok: run: logrotate: (pid 12866) 1s
- execute /opt/gitlab/bin/gitlab-ctl start logrotate
Recipe: gitlab::bootstrap
* file[/var/opt/gitlab/bootstrapped] action create
- create new file /var/opt/gitlab/bootstrapped
- update content in file /var/opt/gitlab/bootstrapped from none to 4ae00c
--- /var/opt/gitlab/bootstrapped 2016-12-16 16:24:23.131000000 +0700
+++ /var/opt/gitlab/.chef-bootstrapped20161216-11498-3h7y1x 2016-12-16 16:24:23.131000000 +0700
@@ -1 +1,2 @@
+All your bootstraps are belong to Chef
- change mode from '' to '0600'
- change owner from '' to 'root'
- change group from '' to 'root'
- restore selinux security context
Recipe: gitlab::mattermost_disable
* link[/opt/gitlab/service/mattermost] action delete (up to date)
* directory[/opt/gitlab/sv/mattermost] action delete (up to date)
Recipe: gitlab::gitlab-pages_disable
* link[/opt/gitlab/service/gitlab-pages] action delete (up to date)
* directory[/opt/gitlab/sv/gitlab-pages] action delete (up to date)
Recipe: gitlab::registry_disable
* link[/opt/gitlab/service/registry] action delete (up to date)
* directory[/opt/gitlab/sv/registry] action delete (up to date)
Recipe: gitlab::default
* link[/opt/gitlab/service/gitlab-git-http-server] action delete (up to date)
* directory[/opt/gitlab/sv/gitlab-git-http-server] action delete (up to date)
Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run
- execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: gitlab::redis
* ruby_block[reload redis svlogd configuration] action create
- execute the ruby block reload redis svlogd configuration
Recipe: gitlab::postgresql
* ruby_block[reload postgresql svlogd configuration] action create
- execute the ruby block reload postgresql svlogd configuration
Recipe: gitlab::unicorn
* ruby_block[reload unicorn svlogd configuration] action create
- execute the ruby block reload unicorn svlogd configuration
Recipe: gitlab::sidekiq
* ruby_block[reload sidekiq svlogd configuration] action create
- execute the ruby block reload sidekiq svlogd configuration
Recipe: gitlab::gitlab-workhorse
* service[gitlab-workhorse] action restart
- restart service service[gitlab-workhorse]
* ruby_block[reload gitlab-workhorse svlogd configuration] action create
- execute the ruby block reload gitlab-workhorse svlogd configuration
Recipe: gitlab::nginx
* ruby_block[reload nginx svlogd configuration] action create
- execute the ruby block reload nginx svlogd configuration
Recipe: gitlab::logrotate
* ruby_block[reload logrotate svlogd configuration] action create
- execute the ruby block reload logrotate svlogd configuration
Running handlers:
Running handlers complete
Chef Client finished, 234/327 resources updated in 01 minutes 31 seconds
gitlab Reconfigured!
[root@hostname ~]#
  1. For the final act, try to access the gitlab by executing the following URL in the web browser :
http://ip_address_of_the_server

The output of Gitlab’s default page is shown as the image below :

So, based on the output rendered in accessing Gitlab’s default page as shown above, Gitlab’s installation process has finally ended.

3 thoughts on “Install Gitlab on CentOS 7 via Command Line

Leave a Reply