Preconfigured GitLab for "localhost"

Preconfigured GitLab for "localhost"

Gitlab preconfigured for a private local host.

Select the gitlab-config-apache or gitlab-config-nginx package for a preconfigured install.

The service will use the `hostname -f` as system name, so this command has to work correctly BEFORE installing the packages. Please make sure your DNS is working.
Add the <fqdn> and gitlab.<fqdn> to your DNS records and/or to your /etc/hosts file.

Gitlab can be reached at: http://gitlab.<fqdn>

User: root

Use the 'systemctl xxxx' or 'service gitlab xxx' command to control the services:

systemctl enable
systemctl disable
systemctl status
systemctl start
systemctl stop

service gitlab status
service gitlab start
service gitlab stop

Topics that will need manual configuration:

* gitlab-runner

To configure the gitlab-runner, login as root in Gitlab, go to the "Admin area -> Runners" and
use the URL and registration token when you run this command as root in a shell:

* Mail confirmation:
cd /srv/www/vhosts/gitlab-ce/config/initializers
cp smtp_settings.rb.sample smtp_settings.rb
chown root.gitlab smtp_settings.rb

Edit the settings and restart GitLab: service gitlab restart

Example setting for a GMail account:
address: "",
port: 587,
user_name: "",
password: "your password",
domain: "",
authentication: :login,
enable_starttls_auto: true,
openssl_verify_mode: 'none'

Other users/passwords used:


Please be aware that changing the password will break the automatic
database migrations. You will need to manually migrate after every update.
see Hints and Tips.

User: gitlab
Password: gitlab1234


This is not a safe setup.
Do NOT use this setup for a public GIT.


Hints and tips:

* Gitlab does not like symlinks. Use mount with the bind option instead.

mount command:
mount --bind /home/server/gitlab/gitlab /srv/gitlab

or a fstab entry:
/home/servers/gitlab/gitlab /srv/gitlab none defaults,bind 0 0

* If you want to relink the apache2 directories,
edit the file /etc/apache2/httpd.conf and
add in the section the statement "Options FollowSymLinks"

* Manually converting the database

Default migration:
su root
export GEM_HOME=/usr/lib64/gitlab-ce/ruby/ruby2.7
export GEM_PATH=/usr/lib64/gitlab-ce/ruby/ruby2.7:/usr/lib64/ruby/gems/ruby2.7
service gitlab stop
systemctl start postgresql
systemctl start gitaly
cd /srv/www/vhosts/gitlab-ce
rake.ruby2.7 db:migrate RAILS_ENV=production
service gitlab start

* Gitlab setup check
rake.ruby2.7 gitlab:check RAILS_ENV=production

KNOWN bugs / problems:

* API error
Check the secret files in /srv/www/vhosts/gitlab-ce


both should not be empty.

The directory /usr/share/gitlab/shell should contain a copy / link of the shell secret file.
The directory ????? should contain a copy / link of the workhorse secret file.

You can generate new codes using:

hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > .gitlab_shell_secret
hexdump -v -n 64 -e '1/1 "%02x"' /dev/urandom > .gitlab_workhorse_secret

chown gitlab.gitlab .xxxx_secret
chmod 600 .xxxx_secret

Name Changed
Comments 0
openSUSE Build Service is sponsored by