как установить gitlab на windows
GitLab — Установка
Вы можете установить GitLab Runner в разных операционных системах, установив систему контроля версий Git и создав учетную запись пользователя на сайте GitLab.
Git — система контроля версий, используемая для —
GitLab — это основанная на Git платформа, предоставляющая удаленный доступ к репозиториям Git и полезная для цикла разработки программного обеспечения, создавая частные и публичные репозитории для управления кодом.
GitLab поддерживает различные типы операционных систем, таких как Windows, Ubuntu, Debian, CentOS, open SUSE и Raspberry Pi 2. В этой главе мы обсудим, как установить GitLab в операционных системах Windows и Ubuntu.
Установка GitLab на Windows:
Шаг 1 — Сначала создайте папку с именем «GitLab-Runner» в вашей системе. Например, вы можете создать на диске C как C: \ GitLab-Runner.
Шаг 3 — Откройте командную строку и перейдите в созданную папку. Теперь введите приведенную ниже команду и нажмите ввод.
Шаг 4 — После выполнения вышеупомянутой команды она попросит ввести URL-адрес координатора gitlab-ci.
Шаг 5 — Введите токен gitlab-ci для бегуна.
Чтобы получить токен, войдите в свою учетную запись GitLab —
Чтобы получить токен, войдите в свою учетную запись GitLab —
Теперь перейдите к вашему проекту —
Теперь перейдите к вашему проекту —
В разделе « Настройки бегунов » вы получите токен, как показано на рисунке ниже —
В разделе « Настройки бегунов » вы получите токен, как показано на рисунке ниже —
Шаг 6 — Введите описание gitlab-ci для бегуна.
Шаг 7 — Он попросит ввести теги gitlab-ci для бегуна.
Вы можете изменить эти теги в пользовательском интерфейсе GitLab позже.
Шаг 8 — Вы можете привязать Runner к текущему проекту, установив для него значение true.
После выполнения описанных выше шагов вы получите сообщение об успешной регистрации: «Регистрация участника … выполнена успешно».
Шаг 9 — Теперь введите Runner executor для построения проекта.
Мы использовали селектор как «докер», который создает среду сборки и легко управляет зависимостями для разработки проекта.
Шаг 10 — Затем он попросит установить изображение по умолчанию для селектора докеров.
Шаг 11 — После выполнения вышеуказанных шагов на экране появится сообщение «Бегун успешно зарегистрирован». На изображении ниже будет описан рабочий процесс вышеуказанных команд —
Шаг 12 — Теперь перейдите к своему проекту, нажмите на опцию CI / CD в разделе « Настройки », и вы увидите активированных бегунов для проекта.
Вы можете увидеть конфигурацию GitLab Runner в файле config.toml в папке GitLab-Runner, как показано ниже —
Установка GitLab на Ubuntu
Следующие шаги описывают установку GitLab в Ubuntu —
Шаг 1 — Сначала войдите на ваш сервер GitLab с помощью SSH (Secure Shell).
Шаг 2 — Затем загрузите пакет Omnibus —
Шаг 3 — Установите постфикс —
Postfix — это агент передачи почты с открытым исходным кодом, используемый для доставки уведомлений по электронной почте.
Шаг 5 — Установите dpkg (менеджер пакетов для системы Debian) для управления установленными пакетами —
Шаг 6 — Чтобы изменения вступили в силу, вам нужно перенастроить GitLab с помощью следующей команды:
Шаг 7 — Проверьте состояние сервисов GitLab с помощью команды ниже —
Almat.su (Almat.pro)
Блог Алмата Жандаулетова
Установка Gitlab on Windows
Как установить Gitlab в Windows? Первая же ссылка в поисковике дала ответ: Самый легкий способ установить Gitlab в Windows-е — это установить виртуальную машину Linux и уже там установить Gitlab. Пост был опубликован на официальном форуме Гитлаба. Автор кажется не шутить? Хм… А есть ли все таки способ?
Что там написано про Windows?
GitLab is developed for Linux-based operating systems. It does not run on Microsoft Windows, and we have no plans to support it in the near future. For the latest development status view this issue. Please consider using a virtual machine to run GitLab.
Gitlab разрабатывался для Linux-based ОС. Оно не запуститься на Windows и у нас нет планов на поддержку этой ОС в ближайшее время. Следить за ходом разработки можете по ссылке. Если хотите запустить на Windows используйте виртуальную машину.
Вот те на… Но постойте, есть же Докер, философия которой заключается как раз в кросс платформенной доставке продукта. Даже есть целый раздел посвязенной установке через Docker https://docs.gitlab.com/omnibus/docker/README.html
Вот только если попытаться запустить на Windows вот этот конфиг:
¶ Git и GitLab
Git — распределённая система контроля версий, которая даёт возможность разработчикам отслеживать изменения в файлах и работать совместно с другими разработчиками. Git выполняет все операции локально, что увеличивает его скорость. Кроме того, он локально сохраняет весь репозиторий в небольшой файл без потери качества данных.
GitLab — веб-приложение и система управления репозиториями программного кода для Git. Обычно GitLab используется вместе с Git и даёт разработчикам возможность сохранять их код онлайн, а затем взаимодействовать с другими разработчиками в разных проектах.
¶ Установка Git
Перед началом работы с GitLab установите себе на устройство приложение Git по ссылке.
Найти подробную инструкцию по установке Git можно здесь.
¶ Авторизация в GitLab
Авторизуйтесь в сервисе GitLab через корпоративную почту @miem.hse.ru.
Затем выберите в верхней панели раздел «Groups». Щелкните на «Your Groups». На этой странице должна находиться группа с номером и названием вашего проекта. Нажмите на нее, чтобы открыть.
Если после авторизации вы не видите группу своего проекта, то обратитесь в Техподдержку.
¶ Установка пароля
После авторизации нужно установить пароль для вашего аккаунта в GitLab.
Нажмите на вашу иконку в правом верхнем углу и перейдите в раздел «Настройки» (settings).
Затем перейдите во вкладку «Пароль» (password).
¶ Создание репозитория
¶ Что такое репозиторий?
Репозиторий (хранилище) — место, где хранятся и поддерживаются данные. Чаще всего данные в репозитории хранятся в виде файлов.
В GitLab используются проекты — структура, включающая в себя репозиторий Git, настройки, обсуждения и другие сопутствующие инструменты.
Узнать более подробную информацию можно перейдя по ссылке: что такое репозиторий?
¶ Как создавать репозиторий?
Шаг 1. Зайдите в свой аккаунт на GitLab и нажмите на иконку «Groups» в верхней панели.
Шаг 2. Затем перейдите во вкладку «Your group».
Шаг 3. Выберите команду с названием вашего учебного проекта.
Если вы не видите в разделе «Your group» команду вашего проекта, то обратитесь в Техподдержку.
Шаг 4. Вы перешли на страницу своей команды. Теперь нужно создать репозиторий. Для этого нажмите на кнопку «New project».
Если у вас уже есть нужный вам репозиторий, то перейдите к шагу 6.
Шаг 5. Напишите название вашего репозитория и добавьте нужные данные. Готово!
Шаг 6.
Переместить проект может человек только с ролью «Maintainer»(подробнее в разделе участники и роли)
Если проект был создан на другой платформе (Github, Bitbucket и т.д.), то при создании нового репозитория откройте вверху вкладку «Import project» вместо «Blank project«, а затем выберите » Repo by URL«.
Нужно обязательно выбрать «Repo by URL«, в остальных случаях импорт не всегда проходит успешно
При этом вся информация по коммитам будет перенесена. Однако, чтобы она корректно отображалась и учитывалась в статистике, необходимо, чтобы коммиты были сделаны с почты @miem.hse.ru. Если коммиты были сделаны с другой почты, то необходимо добавить ее адрес в личном кабинете в Git.miem.hse.ru (подробнее в блоке «Коммит»)
¶ Локальная работа с репозиторием
Откройте нужный репозиторий и нажмите на кнопку «Clone». Скопируйте ссылку.
¶ Переход в консоль
Далее вам нужно перейти в консоль.
Как это сделать?
¶ Клонирование репозитория
То есть мы просим Git создать копию репозитория, который находится по ссылке ( ), и можем указать путь к директории, в которую Git скопирует репозиторий ( ). Если его не указать, директория создастся в каталоге, где вы находитесь, когда выполняете команду и будет называться так же, как и сам репозиторий.
Клонирование репозитория осуществляется командой:
git clone
После вы должны ввести имя пользователя и пароль от своей учетной записи в GitLab.
Вы можете в любой момент перейти к папке с вашим репозиторием с помощью команды:
cd путь/к/директории
Следующая команда показывает, что файл «README.md» скачался и лежит в нашей папке:
dir (ls в Unix)
клонирование репозитория прошло успешно
¶ Заполнение данных
¶ Добавление файлов в репозиторий
Это означает, что у вас чистый рабочий каталог. Другими словами, в нем нет отслеживаемых измененных файлов. Git также не обнаружил неотслеживаемых файлов, в противном случае они бы были перечислены здесь.
Если у вас уже есть некоторые файлы, которые нужно перенести в репозиторий, вы можете скопировать их в рабочий каталог.
¶ Встроенный редактор GitLab
¶ Изменения в существующем файле
Чтобы внести изменения в файл, который скопировался вместе с репозиторием, просто перейдите в папку с копией репозитория на компьютере и откройте этот файл. В нашем случае, это файл «README.md». Он должен содержать описание репозитория, отображаемое на его странице на сайте. Добавьте в него новую строку и сохраните:
Мы видим, что у нас есть недобавленные изменения.
¶ Что такое коммит?
Теперь все нужные изменения добавлены в наш локальный репозиторий.
¶ Добавление нового файла в удаленный репозиторий
Рассмотрим пример:
Создадим новый файл «text.txt» в папке «main» и выполним следующие действия:
Шаг 1. Добавим файл в нашу папку main;
Шаг 2. Зафиксируем изменения и узнаем текущее состояние файла;
Шаг 3. Отправим изменения в локальное хранилище (то есть выполним коммит).
Заходим в GitLab и видим, что отправка данных прошла успешно.
¶ Отмена действий
Укажите, какой файл необходимо удалить из ожидания на коммит.
¶ Проблемы при входе
По натуре своей многие разработчики слишком ленивые не любят делать одно и то же действие много раз. Нам проще научить компьютер, чтобы он делал монотонные действия за нас.
Как только кто-либо из нашей команды вносит изменения в код (читай «мерджит feature-ветку в develop»), наш билд-сервер:
Также, в зависимости от ветки, в которую были внесены изменения, могут быть выполнены:
Под катом о том, как мы научили Gitlab CI делать за нас бОльшую часть этой муторной работы.
Оглавление
Перед началом
Чтобы быть уверенными, что написанное ниже работает, мы взяли на github небольшой проект, написанный на WPF и имеющий unit-тесты, и воспроизвели на нём описанные в статье шаги. Самые нетерпеливые могут сразу зайти в созданный на сайте gitlab.com репозиторий и посмотреть, как это выглядит.
Устанавливаем и регистрируем Gitlab Runner
Чтобы настроить Gitlab Runner, выполните следующие шаги:
Далее надо ввести ответы на вопросы мастера регистрации Runner-а:
Также в этом разделе можно настроить передачу введенных параметров только при сборке защищённых веток (галочка Protected) и/или скрытие значения параметра из логов (галочка Masked).
Подробнее о параметрах окружения сборки смотрите в документации к Gitlab CI.
Активируем режим Developer PowerShell for VS
Скрипт, приведённый выше, уже можно использовать для сборки и вызова тестов. Правда, присутствует НО: крайне неудобно прописывать абсолютные пути к разным установкам Visual Studio. К примеру, если на одной билд-машине стоит Visual Studio 2017 BuildTools, а на другой Visual Studio Professional 2019, то такой скрипт будет работать только для одной из двух машин.
К счастью, с версии Visual Studio 2017 появился способ поиска всех инсталляций Visual Studio на компьютере. Для этого существует утилита vswhere, путь к которой не привязан ни к версии Visual Studio, ни к её редакции. А в Visual Studio 2019 (в версии 16.1 или более новой) есть библиотека, которая умеет «трансформировать» консоль Powershell в режим Developer Powershell, в котором уже прописаны пути к утилитам из поставки VS.
Дописываем переменную к секции Variables:
Затем создаём новую секцию before_msbuild якорем enter_vsdevshell и следующим текстом:
И всюду, где нам надо использовать утилиты Visual Studio, добавляем этот якорь. После этого задача сборки начинает выглядеть намного более опрятно:
Результат: мы имеем путь к vswhere.
Результат: загружен модуль Powershell с командлетом трансформации.
Результат: мы получили полноценную консоль Developer Powershell с прописанными путями к msbuild и многим другим утилитам, которые можно использовать при сборке.
Используем CI для проставления версии во все сборки решения
На заметку: чтобы данная команда работала корректно во всех случаях, автор gitflow даже чуть-чуть поменял скрипты finish hotfix и finish release. Если кому интересно посмотреть обсуждение с автором gitflow, а также увидеть что изменилось (картинка с актуальной схемой в последнем сообщении в треде).
Кстати, по этой же причине если вы используете gitflow, после вливания feature-ветки в develop требуется удалить влитую локальную ветку, после чего пересоздать её от свежего develop:
(обратите внимание на историю git в левой части картинки: из-за отсутствия пути из текущего коммита до коммита с меткой 1.0.5, команда git describe выдаст неверный ответ)
Но вернёмся к автопроставлению версии. В нашем репозитории царит gitflow (точнее его rebase-версия), метки расставляются в ветке master и мы не забываем пересоздавать feature-ветки от develop, а также merge-ить master в develop после каждого релиза или хотфикса.
Тогда получить версию для любого коммита и сразу передать её в msbuild можно добавив всего пару строк к задаче сборки:
Обратите внимание: если вы, согласно gitflow, будете отмечать (тэгировать) ветку master после вливания в неё release или hofix, будьте внимательны: до простановки метки автосборка будет вестись относительно последней существующей ветки. Например, сейчас опубликована версия 3.4, а вы создаёте release-ветку для выпуска версии 3.5. Так вот: всё время существования этой ветки, а также после её вливания в master, но до простановки тэга, автосборка будет проставлять версию 3.4.
Добавляем отправку данных в SonarQube
SonarQube — это мощный инструмент контроля качества кода.
SonarQube имеет бесплатную Community-версию, которая способна проводить полный анализ. Правда, только одной ветки. Чтобы настроить её на контроль качества ветки разработки (develop), требуется выполнить следующие шаги (разумеется, помимо установки и развёртывания сервера SonarQube):
Теперь при каждой сборке ветки develop в SonarQube будет отправляться подробный анализ нашего кода.
На заметку: вообще команда msbuild /t:rebuild полностью пересобирает решение. Вероятно, в большинстве проектов анализ можно было бы встроить прямо в стадию сборки. Но сейчас у нас анализ в отдельной задаче.
Пара слов об использованных параметрах:
«Причёсываем» автотесты xUnit + добавляем вычисление покрытия тестами через OpenCover
Со сборкой более-менее разобрались — теперь приступаем к тестам. Доработаем код прогона тестов, чтобы он:
На заметку: обычно в паре с OpenCover используют ReportGenerator, но при наличии SonarQube мы с тем же успехом можем смотреть результаты через его интерфейс.
Для настройки выполним следующие шаги:
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
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
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.
5. Recommended next steps
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 ).
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
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
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.
5. Recommended next steps
After completing your installation, consider the recommended next steps, including authentication options and sign-up restrictions.