Poniższy poradnik opisuje sposób instalacji GitLab w systemie AlmaLinux 8. Całość wykonamy z wiersza poleceń w kilku prostych krokach.
uruchamiamy terminal jako root i pobieramy repozytorium:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
Sprawdzamy czy repozytorium jest widoczne w systemie:
dnf repolist
Dokonujemy instalacji GitLAB
dnf install gitlab-ce -y
dokonujemy wstępnej konfiguracji, edytujemy plik:
nano /etc/gitlab/gitlab.rb
i zmieniamy :
external_url 'http://gitlab.example.com'
na:
external_url 'http://gitlab.naszadomena.pl'
naszadomena.pl zastępujemy swoją domeną!
Dokonujemy poleceniem przeładowania zmian:
gitlab-ctl reconfigure
Dodajemy httpd do firewalla:
firewall-cmd --permanent --add-service=http
przeładowujemy:
systemctl reload firewalld
Aby wyświetlić hasło root wydajemy polecenie:
cat /etc/gitlab/initial_root_password
Otrzymamy wynik:
# WARNING: This value is valid only in the following conditions # 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run). # 2. Password hasn't been changed manually, either via UI or via command line. # # If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password. Password: XIlQ4/J7oQ49ZdNuGZto3f5vEJGHZJSTRSIuYL9z0/k= # NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
nasze hasło to: XIlQ4/J7oQ49ZdNuGZto3f5vEJGHZJSTRSIuYL9z0/k=
jeśli przekierowaliśmy naszą domenę gitlab.naszadomena.pl na IP serwera po przejściu pod ten adres powinna nam się wyświetlić strona logowania:
logujemy się tam jako logi root i nasze wygenerowane hasło:XIlQ4/J7oQ49ZdNuGZto3f5vEJGHZJSTRSIuYL9z0/k=
Poniżej klika przydatnych poleceń
Aby stworzyć backup wydajemy w konsoli polecenie:
gitlab-rake gitlab:backup:create
Aby dokonać zmiany hasła root wydajemy polecenie:
gitlab-rake "gitlab:password:reset"