Install gitlab on linux

Содержание
  1. Установка веб-инструмента GitLab на Linux Ubuntu Server
  2. Подготовка сервера
  3. 1. Обновление списков пакетов
  4. 2. Время
  5. 3. Настройка брандмауэра
  6. Установка GitLab
  7. 1. Необходимые компоненты
  8. 2. Установка GitLab
  9. 3. Конфигурируем веб-адрес
  10. Вход в веб-интерфейс
  11. Настройка GitLab
  12. Русский интерфейс
  13. Создание репозитория и подключение к нему
  14. Установка GitLab в Ubuntu 18.04
  15. Установка GitLab в Ubuntu 18.04
  16. 1. Установка репозитория
  17. 2. Установка пакета программы
  18. 3. Развёртывание GitLab
  19. 4. Развёртывание программы с установленным Apache
  20. Настройка GitLab в Ubuntu
  21. 1. Авторизация
  22. 2. Настройка аккаунта
  23. 3. Настройка SSH-ключа
  24. 4. Отключение регистрации
  25. 5. Создание проекта
  26. Выводы
  27. Install self-managed GitLab
  28. Official Linux package
  29. Ubuntu
  30. 1. Install and configure the necessary dependencies
  31. 2. Add the GitLab package repository and install the package
  32. 3. Browse to the hostname and login
  33. 4. Set up your communication preferences
  34. 5. Recommended next steps
  35. 1. Install and configure the necessary dependencies
  36. 2. Add the GitLab package repository and install the package
  37. 3. Browse to the hostname and login
  38. 4. Set up your communication preferences
  39. 5. Recommended next steps
  40. Debian
  41. 1. Install and configure the necessary dependencies
  42. 2. Add the GitLab package repository and install the package
  43. 3. Browse to the hostname and login
  44. 4. Set up your communication preferences
  45. 5. Recommended next steps
  46. 1. Install and configure the necessary dependencies
  47. 2. Add the GitLab package repository and install the package
  48. 3. Browse to the hostname and login
  49. 4. Set up your communication preferences
  50. 5. Recommended next steps
  51. CentOS 8
  52. 1. Install and configure the necessary dependencies
  53. 2. Add the GitLab package repository and install the package
  54. 3. Browse to the hostname and login
  55. 4. Set up your communication preferences
  56. 5. Recommended next steps
  57. 1. Install and configure the necessary dependencies
  58. 2. Add the GitLab package repository and install the package
  59. 3. Browse to the hostname and login
  60. 4. Set up your communication preferences
  61. 5. Recommended next steps
  62. CentOS 7
  63. 1. Install and configure the necessary dependencies
  64. 2. Add the GitLab package repository and install the package
  65. 3. Browse to the hostname and login
  66. 4. Set up your communication preferences
  67. 5. Recommended next steps
  68. 1. Install and configure the necessary dependencies
  69. 2. Add the GitLab package repository and install the package
  70. 3. Browse to the hostname and login
  71. 4. Set up your communication preferences
  72. 5. Recommended next steps

Установка веб-инструмента GitLab на Linux Ubuntu Server

Рассмотрим процесс установки и настройки веб-инструмента жизненного цикла DevOps на Linux Ubuntu Server на примере версий 18.04 и 20.04. За основу взята официальная инструкция с сайта GitLab. В нашей инструкции приведен пример установки как платной. так и бесплатной версий программы.

Подготовка сервера

В качестве предварительный настроек, мы обновим список пакетов в репозиториях, настроим правильное время и откроем порты в брандмауэре.

1. Обновление списков пакетов

При желании обновить установленные пакеты, также можно выполнить:

2. Время

Установим часовой пояс:

timedatectl set-timezone Europe/Moscow

* данная команда задаст настройки для московского времени. Все файлы с временными зонами находятся в каталоге /usr/share/zoneinfo.

Для автоматической синхронизации времени ставим пакет:

apt-get install chrony

И разрешаем автозапуск сервиса:

systemctl enable chrony

3. Настройка брандмауэра

По умолчанию, в Ubuntu брандмауэр настроен на то, чтобы принимать любые пакеты. Но если у нас он настроен на блокировку, нужно добавить порты 80 и 443.

iptables -A INPUT -p tcp —dport 80 -j ACCEPT

iptables -A INPUT -p tcp —dport 443 -j ACCEPT

И чтобы сохранить правила, устанавливаем iptables-persistent:

apt-get install iptables-persistent

. и выполняем команду:

Установка GitLab

Установку выполним в два шага — установка необходимых компонентов и, собственно, установка GitLab.

1. Необходимые компоненты

apt-get install curl openssh-server ca-certificates

Для отправки уведомлений, установим также postfix:

apt-get install postfix

При запросе типа конфигурации, выбираем Internet Site (если уведомления должны отправляться наружу) или Local only (уведомления в пределах сервера):

* при получении других запросов во время установки postfix можно ответить по умолчанию, нажимая Enter.

2. Установка GitLab

а) для платной версии:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

б) для бесплатной:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

После установки репозитория, устанавливаем сам GitLab.

а) платную версию:

apt-get install gitlab-ee

б) бесплатную:

apt-get install gitlab-ce

Если установка прошла успешно, мы должны увидеть:

It looks like GitLab has not been configured yet; skipping the upgrade script.

_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/

Thank you for installing GitLab!

3. Конфигурируем веб-адрес

Для запуска и корректной работы портала мы должны задать external_url. Для этого открываем файл:

Нам нужно только изменить параметр external_url:

* данная настройка говорит, что наш веб-инструмент будет отвечать на запросы, которые пришли на узел gitlab.dmosk.ru — это значит, что данное имя должно быть зарегистрирована в DNS или прописано в локальный файл hosts.

Данная операция займет какое-то время.

Вход в веб-интерфейс

Открываем браузер и вводим наш адрес, который мы указали в настройках в опции external_url — в данном примере, http://gitlab.dmosk.ru. Мы должны увидеть страницу авторизации, на которой нас запросят сменить пароль для администратора. Вводим его дважды:

После система попросит ввести логин и пароль — вводим логин root и пароль, который только-что придумали.

Настройка GitLab

Приведем некоторые примеры настроек, которые могут оказаться полезными.

Русский интерфейс

По умолчанию, портал устанавливается с интерфейсом на английском. Для смены языка, кликаем по иконке в правом верхнем углу и выбираем Settings:

В меню слева нажимаем по Preferences:

В подразделе Localization выбираем нужный нам язык и первый день недели:

Сохранияем настройки и перезапускаем страницу для применения нового языка.

Создание репозитория и подключение к нему

Попробуем создать проект и подключиться к нему из Linux. Также для теста мы создадим файл и закинем его в наш репозиторий.

В веб-интерфейсе GitLab создаем новый проект:

Задаем имя проекта, оставляем или редактируем URL, выбираем уровень доступа. После кликаем по кнопке Создать проект:

* в данном примере мы создаем проект с названием Test, url до него будет http://gitlab.dmosk.ru/root/test. Уровень доступа мы задаем «Приватный» — доступ к репозиторию будет только у авторизованного пользователя.

Для примера попробуем подключиться с компьютера Linux к нашему репозиторию и закинуть на него тестовый файл.

Для начала установим git на компьютер с Linux:

а) Если используем CentOS / Red Hat:

yum install git-core

б) Если используем Ubuntu / Debian:

Источник

Установка GitLab в Ubuntu 18.04

Один из самых популярных репозиториев для хранения и общего доступа к коду — это GitHub, однако после покупки проекта компанией Microsoft популярность стали набирать и другие проекты, один из них — GitLab. Это аналогичный свободный менеджер репозиториев, с помощью которого можно работать с кодом, принимать Pull Request’ы, отслеживать сообщения об ошибках и тестировать свои приложения.

У GitLab есть такие же инструменты, как и у GitHub, есть страница Issue для сообщений об ошибках, есть поддержка код-ревью, wiki, а также вы можете работать с несколькими приватными проектами.

Установка GitLab в Ubuntu 18.04

У GitLab есть несколько версий. Кроме онлайн версии, в которую вы можете выгружать свои проекты, доступной на веб-сайте GitLab.com, есть версия Community Edition и платная версия Enterprice Edition, которые можно установить на свой компьютер и создать собственный Git-сервер. В этой инструкции мы рассмотрим, как установить GitLab Ubuntu 18.04 версии Community Edition. Для этого будем использовать официальный репозиторий.

Сначала обновите репозитории до самой последний версии:

sudo apt upgrade

1. Установка репозитория

Затем нужно загрузить установщик репозитори из официального сайта. Этот скрипт загрузит и установит все ключи и инструменты необходимые, чтобы подключить репозиторий Gitlab в систему. Для его загрузки и запуска выполните команду:

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

2. Установка пакета программы

После завершения вы можете установить gitlab-ce командой:

sudo apt install gitlab-ce

Когда установка GitLab Ubuntu 18.04 будет завершена, вы увидите такое сообщение:

3. Развёртывание GitLab

Теперь нам необходимо подготовить программу к работе. Сначала нужно настроить URL, по которой будет открываться интерфейс GitLab. Для этого откройте файл /etc/gitlab/gitlab.rb и найдите там строчку external_url. Здесь нужно указать ваш домен. На своём локальном компьютере я буду использовать домен gitlab.local:

Читайте также:  Windows 10 enterprise установить edge

sudo vi /etc/gitlab/gitlab.rb

Сохраните и закройте файл. После этого надо пересобрать программу, учитывая изменённую конфигурацию:

sudo gitlab-ctl reconfigure

Если на вашем сервере включён брандмауэр, необходимо добавить в исключения порты для протоколов http и ssh:

sudo ufw allow ssh
sudo ufw allow http

Чтобы наш локальный домен работал, необходимо добавить запись о нём в файл /etc/hosts:

sudo vi /etc/hosts

4. Развёртывание программы с установленным Apache

Если на вашем компьютере уже установлен веб-сервер Apache, вы можете настроить программу таким образом, чтобы она работала через существующий веб-сервер. Для этого измените такие строки в /etc/gitlab/gitlab.rb:

sudo vi /etc/gitlab/gitlab.rb

external_url ‘http://gitlab.local’
nginx[‘enable’] = false
web_server[‘external_users’] = [‘www-data’]

Затем пересоберите программу:

sudo gitlab-ctl reconfigure

В Apache надо добавить новый виртуальный хост с такой конфигурацией:

sudo vi /etc/apache2/sites-available/gitlab.conf

Здесь gitlab.local — это домен, который будет использоваться для доступа к gitlab, а порт 8080 — тот порт, на котором сервис gitlab ожидает соединений. Его можно посмотреть командой:

sudo netstat -pant | grep unicorn

После этого активируйте модули Apache — rewrite, proxy и proxy_http:

sudo a2enmod rewrite
sudo a2enmod proxy
sudo a2enmod proxy_http

А потом активируйте наш виртуальный хост и перезапустите Apache:

sudo a2ensite gitlab
sudo systemctl restart apache2

Настройка GitLab в Ubuntu

1. Авторизация

Дальше вы можете войти в веб-интерфейс. Для этого откройте в браузере выбранный домен: http://gitlab.local

На первом шаге вам нужно ввести пароль для суперпользователя.

Далее надо авторизоваться в системе. Для этого введите логин root и ранее выбранный пароль, затем нажмите Sign in.

2. Настройка аккаунта

Затем настроим имя вашего пользователя. По умолчанию используется Administrator. Откройте меню Settings и найдите там пункт Full Name и укажите там желаемое имя:

Затем нажмите кнопку Update profile settings.

3. Настройка SSH-ключа

Для того чтобы вы могли без ввода логина и пароля отправлять данные в этот репозиторий, нужно прописать сюда ваш публичный ключ. Для этого сначала создайте соответствующий ключ для GitLab командой:

Если в вашей системе уже есть другие ssh-ключи, то вы можете изменить имя создаваемого ключа. Для этого, когда программа спросит путь, куда нужно сохранить ключ, введите старый путь и новое имя:

Ключ будет находится в файле с расширением *.pub. Если вы выбрали имя файла gitlab_rsa, то публичный ключ будет находится в файле gitlab_rsa.pub. Скопируйте этот ключ. Затем откройте в левом меню веб-интерфейса GitLab пункт SSH Keys, вставьте ключ в поле Key и нажмите Add key:

После этого ключ будет добавлен и вы сможете пользоваться репозиторием. Однако надо заметить, что с пользователем root на локальной машине такая операция не пройдёт, также ничего не будет работать, если вы попытаетесь использовать того же пользователя, от имени которого вы авторизованы в системе.

4. Отключение регистрации

Кликните по значку ключа на верхней панели, а затем в левом меню выберите Settings. Здесь найдите пункт Sign-up restrictions и снимите галочку с пункта sign-up enabled:

Затем сохраните настройки.

5. Создание проекта

Кликните по кнопке со значком Плюс, затем выберите New Project:

В открывшемся окне введите имя проекта, например testproject, и нажмите кнопку Create Project:

Затем откройте терминал и клонируйте полученный репозиторий:

git clone http://gitlab.local/root/testproject.git

Далее добавьте файл README.md:

И отправьте изменения на сервер:

git commit -m ‘Add README.md’

git push origin master

Теперь в интерфейсе программы вы увидите только что созданный коммит и новый файл:

Выводы

В этой статье мы разобрали, как выполняется установка GitLab Server Ubuntu 18.04. Как видите, это не так сложно, как может показаться на первый взгляд. Здесь очень удобно отслеживать изменения в своих проектах и работать в команде, не рассчитывая на доступность сторонних сервисов.

Источник

Install self-managed GitLab

You can download, install and maintain your own GitLab instance.

Want us to host your instance, no installation required? Try GitLab SaaS today

Want to try GitLab Ultimate for 30 days? Get your free trial

Recommended Installation Method

Official Linux package

This is the recommended method for getting started. The Linux packages are mature, scalable, and are used today on GitLab.com. If you need additional flexibility and resilience, we recommend deploying GitLab as described in the reference architecture documentation.

Linux installation is quicker to install, easier to upgrade and contains features to enhance reliability not found in other methods. Install via a single package (also known as Omnibus) that bundles all the different services and tools required to run GitLab. At least 4 GB of RAM is recommended.

Ubuntu

18.04 LTS, 20.04 LTS

For Ubuntu 20.04, arm64 packages are also available.

1. Install and configure the necessary dependencies

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

For Ubuntu 20.04, arm64 packages are also available.

1. Install and configure the necessary dependencies

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

Читайте также:  Редактор windows media player

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

Debian

For Debian 10, arm64 packages are also available.

1. Install and configure the necessary dependencies

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

For Debian 10, arm64 packages are also available.

1. Install and configure the necessary dependencies

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

CentOS 8

and RHEL, Oracle, Scientific

For CentOS and RedHat 8, arm64 packages are also available.

1. Install and configure the necessary dependencies

On CentOS 8, the commands below will also open HTTP, HTTPS and SSH access in the system firewall. This is an optional step, and you can skip it if you intend to access GitLab only from your local network.

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Читайте также:  Sas драйвер для windows

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

For CentOS and RedHat 8, arm64 packages are also available.

1. Install and configure the necessary dependencies

On CentOS 8 (and RedHat 8), the commands below will also open HTTP, HTTPS and SSH access in the system firewall. This is an optional step, and you can skip it if you intend to access GitLab only from your local network.

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

CentOS 7

and RHEL, Oracle, Scientific

1. Install and configure the necessary dependencies

On CentOS 7, the commands below will also open HTTP, HTTPS and SSH access in the system firewall. This is an optional step, and you can skip it if you intend to access GitLab only from your local network.

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

1. Install and configure the necessary dependencies

On CentOS 7 (and RedHat/Oracle/Scientific Linux 7), the commands below will also open HTTP, HTTPS and SSH access in the system firewall. This is an optional step, and you can skip it if you intend to access GitLab only from your local network.

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.

During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

Next, install the GitLab package. Make sure you have correctly set up your DNS, and change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.

For https:// URLs, GitLab will automatically request a certificate with Let’s Encrypt, which requires inbound HTTP access and a valid hostname. You can also use your own certificate or just use http:// (without s ).

If you would like to specify a custom password for the initial administrator user ( root ), check the documentation. If a password is not specified, a random password will be automatically generated.

3. Browse to the hostname and login

Unless you provided a custom password during installation, a password will be randomly generated and stored for 24 hours in /etc/gitlab/initial_root_password . Use this password with username root to login.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

Important note: If you do not opt-in to the security newsletter, you will not receive security alerts.

After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.

Источник

Оцените статью