1

I'm trying to install GitLab community edition on ubuntu 20.04 I've followed below commands:

sudo apt update
sudo apt-get install -y curl openssh-server ca-certificates
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

I don't know what to do in command 5, how to edit the GitLab configuration file to set hostname and other parameters:

sudo vi /etc/gitlab/gitlab.rb

How to install Gitlab?

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

1

Your point 5 (sudo vi /etc/gitlab/gitlab.rb) is the next logical step.

Change the external_url from http://example.gitlab.com to the local IP of your Ubuntu server, for instance http://192.168.1.131

In "Install and Configure Gitlab on Ubuntu ", you will find other settings regarding emails and email settings.
But for now, that is enough to start.

Once you have made your changes:

sudo gitlab-ctl reconfigure
sudo gitlab-ctl status

If there is any error, check the integrity of your GitLab installation with

sudo gitlab-rake gitlab:env:info --trace

You can see other troubleshooting steps in "Gitlab not starting after upgrade to Ubuntu 18.04" (which should help even on a more recent Ubuntu).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for your response, what changes am I suppose to make after executing command--> sudo vi /etc/gitlab/gitlab.rb Please, help me out I'm new to GitLab. – user17551439 Jan 07 '22 at 12:21
  • @user17551439 After changing the rb file, you can start with the two commands I mention in my answer. – VonC Jan 08 '22 at 21:10
  • I'm asking what changes do I need to do in the rb file? – user17551439 Jan 09 '22 at 12:07
  • @user17551439 Sorry, I misread. I have edited the answer to address your comment. – VonC Jan 09 '22 at 12:17
  • Thanks for your response. One more thing can I use command, sudo EXTERNAL_URL="http://gitlabce.example.com" instead of sudo vi /etc/gitlab/gitlab.rb for changing external url to the local IP ? – user17551439 Jan 11 '22 at 05:51
  • @user17551439 I don't think so: it is better to edit it directly in the rb file. – VonC Jan 11 '22 at 08:05