Installing GitLab on CentOS 7
-
This is an easy one for a Friday evening. GitLab has a pretty simple installation but, as with nearly every project, their documentation is incorrect. Easy to fix, but incorrect. So to make things as easy as possible for someone looking to get up and running with GitLab on their own CentOS 7 (or RHEL 7) server, we have a script to handle is all for us.
For my test system, as usual, I'm using a CentOS 7 Minimal template on my Scale HC3 cluster, but this should work just about anywhere. Very vanilla build. Running as room for the install.
#!/bin/bash yum -y install firewalld curl policycoreutils yum -y update systemctl restart firewalld firewall-cmd --permanent --add-service=http systemctl reload firewalld systemctl enable firewalld curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash yum -y install gitlab-ce gitlab-ctl reconfigure
That's it. You can now sign in to http://yourserverurl/ and access GitLab.
Of course for production you would want to modify Nginx to use SSL (try LetEncrypt for free) and port 443.
-
-
@scottalanmiller You may want to add
systemctl enable firewalld
assuming you are based on the 1511 build. -
Check out Gogs:
It's a single process Git server written in Go. We use it. Infinitely easier to deal with than GitLab, though it lacks some features.
-
@JaredBusch said:
@scottalanmiller You may want to add
systemctl enable firewalld
assuming you are based on the 1511 build.Done
-
@adam.ierymenko said:
Check out Gogs:
It's a single process Git server written in Go. We use it. Infinitely easier to deal with than GitLab, though it lacks some features.
Thanks, will check it out.
Connected to the GitLab box over ZeroTier right now, by the way
-
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
-
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
-
@JaredBusch said:
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
Right. I'm just curious if he has added the epel-release or any other repos to it.
-
@dafyre said:
@JaredBusch said:
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
Right. I'm just curious if he has added the epel-release or any other repos to it.
Back in the original threads on this, he stated that it had none of that intentionally because it was going to be used for these types of documentation.
-
@JaredBusch said:
@dafyre said:
@JaredBusch said:
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
Right. I'm just curious if he has added the epel-release or any other repos to it.
Back in the original threads on this, he stated that it had none of that intentionally because it was going to be used for these types of documentation.
Cool. Thanks for clearing it up 8-)
Gitlab. May have to move mine to France too, lol.
-
@JaredBusch said:
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
Only things modified on the base template are that FirewallD is added (I try to always add that again in the script in case people miss that), updates are already run and my user accounts and keys are there already.
-
@dafyre said:
@JaredBusch said:
@dafyre said:
As a matter of correctness... Do you have EPEL /REMI or any other repos installed in your CentOS 7 image?
The script is connecting the Gitlab RPM, that is all. The base image he uses for all of these is CentOS 7 minimal, release 1511 unless he has changed the base template on his scale cluster.
Right. I'm just curious if he has added the epel-release or any other repos to it.
Definitely no EPEL. I often use it, but avoid it in the base image.