-
Notifications
You must be signed in to change notification settings - Fork 8
Quick GitLab setup
GitLab is complete GitHub like environment - "self-hosted GitHub". To be correct - GitLab is created by separate entity - there is no relation to GitHub.
Tested guest OS: CentOS 7.4, 10GB disk, 2GB RAM (4GB recommended - see https://docs.gitlab.com/ee/install/requirements.html#memory).
Tested GitLab version:
rpm -q gitlab-ce
gitlab-ce-10.7.3-ce.0.el7.x86_64
Generally I followed guide from https://about.gitlab.com/installation/#centos-7
However I replaced all ee
(Enterprise Edition) tokens with ce
(Community Edition)
to clearly see what is there. Otherwise GitLab recommends to install EE edition (without license
it has same features as CE, however it offers easy upgrade from CE to EE).
NOTE: My OS hostname is centos7.example.com
Just did as root:
set -x
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
yum install -y postfix
systemctl enable postfix
systemctl start postfix
# we use CE
curl -o script.rpm.sh \
https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh
chmod a+rx script.rpm.sh
./script.rpm.sh
# my VM has FQDN "centos7.example.com"
EXTERNAL_URL="http://centos7.example.com" yum install -y gitlab-ce
WARNING!
When installing GitLab under LXC container it will fail to configure because it will attempt to overwrite many sysctl kernel parameters. Workaround is to disable this feature using: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4967
Simply modify
/etc/gitlab/gitlab.rb
/ this way:--- etc/gitlab/gitlab.rb.xxxx 2024-07-27 07:04:11.044948012 +0000 +++ etc/gitlab/gitlab.rb 2024-07-27 07:04:35.211144430 +0000 @@ -2843,7 +2843,7 @@ ##! Attempt to modify kernel paramaters. To skip this in containers where the ##! relevant file system is read-only, set the value to false. -# package['modify_kernel_parameters'] = true +package['modify_kernel_parameters'] = false ##! Specify maximum number of tasks that can be created by the systemd unit ##! Will be populated as TasksMax value to the unit file if user is on a systemdAnd rerun
gitlab-ctl reconfigure
as root.
Logon to reset GitLab root password - in my case to http://centos7.example.com
Before creating user1
in GitLab - create him in CentOS7 to receive password reset link:
/usr/sbin/useradd -m user1
Than create user [email protected]
in Gitlab Web UI
After user creation extract link from e-mail:
less /var/spool/mail/user1
Click on link to reset user1's password.
Than you can create project - in case of HTTP Git URL you don't need more setup (otherwise you need to upload your SSH public key)
Copyright © Henryk Paluch. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License