LogoopenSUSE Build Service > Projects
Sign Up | Log In

Preconfigured GitLab for "localhost"

Preconfigured GitLab for "localhost"

Gitlab preconfigured for a private local host.

Select the gitlab-config-postgresql-apache 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
Password: <your password>

Use the 'gitlabctl' command to control the services:

gitlabctl enable
gitlabctl disable
gitlabctl status
gitlabctl start
gitlabctl stop

gitlabctl backup

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:

         gitlab-runner register

 * 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: systemctl restart gitlab

   Example setting for a GMail account:
     address: "smtp.gmail.com",
     port: 587,
     user_name: "your.name@gmail.com",
     password: "your password",
     domain: "smtp.gmail.com",
     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 <Directory /> the statement "Options FollowSymLinks"

* Manually converting the database

   Default migration:
     su root
     systemctl stop gitlab
     cd /srv/www/vhosts/gitlab-ce
     rake.ruby2.5 db:migrate RAILS_ENV=production
     yarn install --production --pure-lockfile
     rake.ruby2.5 gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
     systemctl start gitlab

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

KNOWN bugs / problems:

* API error / gitlab-shell 401
    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

Comments for home:Ximi1970:Servers:Gitlab:latest (0)

Login required, please login or signup in order to comment