Install GitLab on CentOS really simple and you can find a lot of similar articles. But I wrote this article during installing and my comments may be helpful for you.
Presequenties
- CentOS 7.x. I used for this article 7.6
- Server with minimum 2Gb of RAM. I will use a local server for local usage
- 5 minutes of your time
If you are lazy as me – just check out ready script on GitHub. But please check the end of this article about performance.
Let’s Install GitLab on CentOS
In each my project I used CentOS. I don’t know why – maybe I love it or don’t want to be in the mainstream of Ubuntu howtos. You may check my other articles for CentOS about install PostgreSQL and the golanding project.
First – it should be first, think about firewall and install it:
yum install -y firewalld firewall-config systemctl start firewalld
and add http and https services to your default zone:
firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https systemctl reload firewalld
Fuh. Now I’m quite. Now we can start to install Gitlab. Start from dependencies:
yum install -y curl policycoreutils-python openssh-server
yum install -y postfix systemctl start postfix systemctl enable postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
export EXTERNAL_URL=http://your.domain.com yum install -y gitlab-ce
That’s all folks! After it, you should open your GitLab in the browser and set up the root password and so on.
Performance
I: A machine with 1xCPU and 2Gb of RAM will be enough for GitLab.
GitLab:
That’s right – 2Gb of RAM not enough even for 1 user. You will be get “502 error” very often. You need a machine with 8Gb of RAM instead.
Conclusion and improvements
In my case – I don’t need an SSL certificate for my GitLab because it works only in a local network.
For serving GitLab on Cloud – please set up SSL for your server. For example good howto – How to Install and Configure GitLab CE on CentOS 7. Come on, 2k19 – it has to be secure.