7

I am trying to install GitLab on a subdomain. I am not very familiar with web servers and stuff, only very little knowledge. I am currently connected to the subdomain via ssh admin@mysite.com on the Mac's Terminal. Then I ls to the subdomain's folder. Question is if I execute:

curl -O https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab-7.4.3_omnibus.5.1.0.ci-1.el6.x86_64.rpm
sudo yum install openssh-server
sudo yum install postfix
sudo yum install cronie
sudo service postfix start
sudo chkconfig postfix on
sudo rpm -i gitlab-7.4.3_omnibus.5.1.0.ci-1.el6.x86_64.rpm

on the current folder. Will GitLab be installed or downloaded only in the current folder or will other subdomains and folders of the site be affected?

Is there a way to test yum install first on the current directory?

SleepNot
  • 2,982
  • 10
  • 43
  • 72

1 Answers1

12

The Omnibus/RPM version of Gitlab will install gitlab to the /opt/gitlab directory. If you want to check the files that will be installed by an RPM package you can do so with:

rpm -qlp gitlab-7.4.3_omnibus.5.1.0.ci-1.el6.x86_64.rpm

After you install the RPM with "rpm -ivh gitlab*.rpm" you configure the URL/subdomain using the:

/etc/gitlab/gitlab.rb 

file. After amending the gitlab.rb file you can start gitlab with:

gitlab-ctl start

Or restart it with:

gitlab-ctl restart

You can configure the web address & port that gitlab/nginx listens on using the external_url parameter in the gitlab.rb file:

external_url "https://gitlab.mydomain.com"

If you already have a webserver (such as Apache) using port 80 or port 443 then you might want to ask gitlab/nginx to listen on a port other than 80 or 443 with:

external_url "https://gitlab.mydomain.com:8443"

You can check if anything is listening on particular ports using:

netstat -luntap | grep LISTEN
jonny
  • 508
  • 5
  • 11
  • So will it install files outside of my subdomain directory? Because I have files in the main domain and other subdomains that I don't wanna mess up. – SleepNot Nov 19 '14 at 09:03
  • `gitlabctl-restart` should be `gitlab-ctl restart` – Antonín Procházka Sep 24 '16 at 11:04
  • 2
    And `gitlab-ctl restart` does not do the job here. You need to run `gitlab-ctl reconfigure`. (See https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#configuring-the-external-url-for-gitlab.) – Antonín Procházka Sep 24 '16 at 11:16
  • I get the following error: `Validation failed for domain subdomain.example.com` any idea why? – Newskooler Jul 20 '19 at 16:12