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
Password:
Use the 'systemctl xxxx gitlab.target' or 'service gitlab xxx' command to control the services:
systemctl enable gitlab.target
systemctl disable gitlab.target
systemctl status gitlab.target
systemctl start gitlab.target
systemctl stop gitlab.target
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:
su
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: "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:
PostgreSQL
----------
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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING:
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
.gitlab_shell_secret
.gitlab_workhorse_secret
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