[GitLab] Linux CentOS 8 ํ™˜๊ฒฝ GitLab ์„ค์น˜ ๋ฐ ๊ธฐ๋™

2023. 2. 10. 15:19ยท๐Ÿ’ฌ CI · CD/Git : ๊นƒ
728x90

์„ค์น˜ ํ™˜๊ฒฝ

์ฐธ๊ณ : https://docs.gitlab.com/ee/install/requirements.html

  • GitLab : gitlab-ce-15.6.7-ce.0.el8.x86_64.rpm
  • OS : CentOS 8 (230125 ver)
  • ETC : 8GB RAM(8GB RAM ↑), 4Core CPU(2Core CPU ↑), 50GB Disk
 

Installation system requirements | GitLab

Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.

docs.gitlab.com

 

 

์‚ฌ์ „ ์ค€๋น„

์ฐธ๊ณ : https://about.gitlab.com/install/#centos-8

Official Linux package > CentOS > View install instructions +

 

Download and install GitLab

Download, install and maintain your own GitLab instance with various installation packages and downloads for Linux, Kubernetes, Docker, Google Cloud and more.

about.gitlab.com

 

1. Install and configure the necessary dependencies

$ sudo yum install -y curl policycoreutils openssh-server
$ # Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
$ sudo systemctl enable sshd
$ sudo systemctl start sshd
$ # Check if opening the firewall is needed with: sudo systemctl status firewalld
$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=https
$ sudo systemctl reload firewalld

$ # ์„ค์น˜ ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•˜์—ฌ ์•„๋ž˜ ํŒจํ‚ค์ง€ ์ถ”๊ฐ€ ์„ค์น˜
$ sudo yum install -y perl
$ sudo yum install -y policycoreutils-python-utils
$ sudo yum install postfix
$ sudo systemctl enable postfix
$ sudo systemctl start postfix

 

2. Add the GitLab package repository and install the package

์—ฌ๊ธฐ์„œ๋ถ€ํ„ฐ๋Š” ํ™ˆํŽ˜์ด์ง€์˜ ๋‚ด์šฉ์„ ๋”ฐ๋ผํ•˜์ง€ ์•Š๊ณ  rpm ๋ช…๋ น์œผ๋กœ GitLab ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ์„ค์น˜ํ•œ๋‹ค.

  • GitLab ๋ฐ”์ด๋„ˆ๋ฆฌ : https://packages.gitlab.com/gitlab/gitlab-ce?page=1

$ # $USER_HOME/gitlab/ ์•„๋ž˜์— gitlab ๋ฐ”์ด๋„ˆ๋ฆฌ rpm ํŒŒ์ผ์„ ๋„ฃ์€ ํ›„
$ sudo rpm -ivh gitlab-ce-15.6.7-ce.0.el8.x86_64.rpm
$ # ํŒจํ‚ค์ง€ ์„ค์น˜ ๋˜๋Š” ์ข…์†์„ฑ ์˜ค๋ฅ˜ ๋ฐœ์ƒ์‹œ yum ๋„๊ตฌ ์‚ฌ์šฉํ•˜์—ฌ ์ถ”๊ฐ€ ์„ค์น˜ํ•ด์•ผ ํ•จ

Failed ์ถœ๋ ฅ?

๊ฒฝ๊ณ : gitlab-ce-15.6.7-ce.0.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID f27eab47: NOKEY
Verifying...                          ################################# [100%]
์ค€๋น„ ์ค‘...                         ################################# [100%]
Updating / installing...
   1:gitlab-ce-15.6.7-ce.0.el8        ################################# [100%]
[2023-02-10T14:07:24+09:00] WARN: Please install an English UTF-8 locale for Cinc Client to use, falling back to C locale and disabling UTF-8 support.
It looks like there was a problem with public attributes; run gitlab-ctl reconfigure manually to fix.
๊ฒฝ๊ณ : %posttrans(gitlab-ce-15.6.7-ce.0.el8.x86_64) scriptlet failed, exit status 1

 

์„ค์น˜ ํ™•์ธ. failed ์ถœ๋ ฅ๋˜์ง€๋งŒ ์„ค์น˜๋œ ๊ฒƒ์œผ๋กœ ๋ณด์ž„

 

3~. ์„ค์ • ํŒŒ์ผ ์„ธํŒ…

/etc/gitlab/gitlab.rb ํŒŒ์ผ์˜ external_url ๊ฐ’ ์ˆ˜์ • - vi ํŽธ์ง‘๊ธฐ๋กœ ํŒŒ์ผ ์—ด์–ด GitLab URL ๋ถ€๋ถ„ ์ฐพ๊ธฐ

์ˆ˜์ • ํ›„ ์„ค์ • ํŒŒ์ผ ์ ์šฉ - ์ตœ์ดˆ ์‹คํ–‰์‹œ ์‹œ๊ฐ„์ด ๋‹ค์†Œ ์†Œ์š”๋จ. ์™„๋ฃŒ๋˜๋ฉด gitlab Reconfigured! ๋ฉ”์‹œ์ง€ ์ถœ๋ ฅ

$ sudo gitlab-ctl reconfigure

 

GitLab ๊ธฐ๋™ (root ๊ถŒํ•œ ํ•„์š”)

$ gitlab-ctl start

WARN ๊ฒฝ๊ณ ๋Š” UTF-8 ๋ฏธ์ง€์›์œผ๋กœ ์ธํ•จ. ํ˜„์žฌ๋Š” ๋ฌด์‹œ

Gitlab URL๋ž€์— ์ž‘์„ฑํ•œ ์ฃผ์†Œ(http://localhost:9876/users/sign_in)๋กœ ์›น ์ ‘์†

root ๊ณ„์ • ๋น„๋ฐ€๋ฒˆํ˜ธ ํš๋“ (ํšŒ์›๊ฐ€์ž…ํ•œ ์ผ๋ฐ˜ ์‚ฌ์šฉ์ž๋Š” ๊ถŒํ•œ์ด ์—†์–ด ๋กœ๊ทธ์ธ ๋ถˆ๊ฐ€)

/etc/gitlab/ ์•„๋ž˜์˜ initial_root_password ํŒŒ์ผ ๋‚ด์— ์กด์žฌ [์ตœ์ดˆ ๊ธฐ๋™ ํ›„ 24์‹œ๊ฐ„ ๋’ค ํŒŒ์ผ ์ž๋™ ์‚ญ์ œ]

ํ•ด๋‹น ๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ๋กœ๊ทธ์ธ ํ›„ ์ƒˆ ๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ

 

Webhook ์„ค์ • ์ถ”๊ฐ€

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Settings > Network > Outbound requests > Expand

Allow requests to the local network from web hooks and services ์ฒดํฌ ํ›„ Save changes

 

User ์ƒ์„ฑ

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Overview > Users

New user > ์ •๋ณด ๊ธฐ์ž… ํ›„ Create User

 

User ๋‚ด Password ์ƒ์„ฑ

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Overview > Users

์›ํ•˜๋Š” ์œ ์ € ์„ ํƒ ํ›„ Edit > Password, Password confirmation ์ž…๋ ฅ ํ›„ Save changes

 

Group ์ƒ์„ฑ

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Overview > Groups

New group > ์ •๋ณด ๊ธฐ์ž… ํ›„ Create group

 

Group ๋‚ด User ์ถ”๊ฐ€

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Overview > Groups

Group ์ด๋ฆ„ ์„ ํƒ > Add user(s) to the group์—์„œ ์œ ์ € ์ถ”๊ฐ€

 

Project ์ƒ์„ฑ

GitLab ์›นํŽ˜์ด์ง€ ์ ‘์† > Menu > Admin > Admin Area > Overview > Projects > New Project > Create blank project

Project name, URL, slug ์ •๋ณด ๊ธฐ์ž… ํ›„ Create project

 

๋”๋ณด๊ธฐ

GitLab ์ข…๋ฃŒ

$ gitlab-ctl stop

 

GitLab ์‚ญ์ œ

์•„๋ž˜ ๋ช…๋ น ์ˆ˜ํ–‰ ํ›„ /opt/gitlab, /var/opt/gitlab, /etc/gitlab, /var/log/gitlab, /etc/yum.repos.d/gitlab ๊ด€๋ จํŒŒ์ผ ์‚ญ์ œ

$ sudo gitlab-ctl uninstall
$ sudo gitlab-ctl cleanse
$ sudo gitlab-ctl remove-accounts
$ sudo dpkg -P gitlab-ce || sudo yum -y remove gitlab-ce
728x90
์ €์ž‘์žํ‘œ์‹œ (์ƒˆ์ฐฝ์—ด๋ฆผ)

'๐Ÿ’ฌ CI ยท CD > Git : ๊นƒ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Git] cmd command๋กœ git ์ด์šฉํ•˜๊ธฐ  (0) 2025.02.05
[Github] VSCode์—์„œ Github๋กœ Commit, Pushํ•˜๊ธฐ  (0) 2024.08.30
[GitLab] CentOS 7์— GitLab (ce) ์„ค์น˜ํ•˜๊ธฐ - ์˜คํ”„๋ผ์ธ(์ˆ˜๋™) ์„ค์น˜  (0) 2023.04.11
[GitLab] CentOS 7์— GitLab (ce) ์„ค์น˜ํ•˜๊ธฐ - curl/yum ์ด์šฉํ•œ ์˜จ๋ผ์ธ ์„ค์น˜  (0) 2023.04.10
[E] Github Unable to push - fatal: protocol 'https' is not supported  (0) 2022.10.14
'๐Ÿ’ฌ CI · CD/Git : ๊นƒ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
  • [Github] VSCode์—์„œ Github๋กœ Commit, Pushํ•˜๊ธฐ
  • [GitLab] CentOS 7์— GitLab (ce) ์„ค์น˜ํ•˜๊ธฐ - ์˜คํ”„๋ผ์ธ(์ˆ˜๋™) ์„ค์น˜
  • [GitLab] CentOS 7์— GitLab (ce) ์„ค์น˜ํ•˜๊ธฐ - curl/yum ์ด์šฉํ•œ ์˜จ๋ผ์ธ ์„ค์น˜
  • [E] Github Unable to push - fatal: protocol 'https' is not supported
mxnxeonx
mxnxeonx
"์•„, ์ด๊ฑฐ ๋ญ์˜€๋”๋ผ"๋ฅผ ํ•˜์ง€ ์•Š๊ธฐ์œ„ํ•œ ์ผ๊ธฐ์žฅ.
  • mxnxeonx
    MJ's Development Diary
    mxnxeonx
  • ์ „์ฒด
    ์˜ค๋Š˜
    ์–ด์ œ
    • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (158)
      • ๐Ÿ’ป Language (43)
        • Java : ์ž๋ฐ” (18)
        • Python : ํŒŒ์ด์ฌ (9)
        • ROS : ๋กœ๋ด‡์‹œ์Šคํ…œ (9)
        • Android : ์•ˆ๋“œ๋กœ์ด๋“œ (4)
        • JavaScript : ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ (2)
      • ๐ŸŒ Environment (19)
        • IDE : ํ†ตํ•ฉ๊ฐœ๋ฐœํ™˜๊ฒฝ (9)
        • Virtual : ๊ฐ€์ƒํ™˜๊ฒฝ (10)
      • โš™ Framework (12)
        • Vue-๋ทฐ (3)
        • Spring-์Šคํ”„๋ง (7)
      • ๐Ÿ’พ DataBase (18)
      • ๐ŸŒŒ OS (36)
        • Linux-๋ฆฌ๋ˆ…์Šค (36)
      • ๐Ÿ’ฌ CI · CD (7)
        • Git : ๊นƒ (7)
      • ๐Ÿ“ƒ ETC (6)
      • ๐Ÿค– AI (5)
  • ๋งํฌ

    • GitHub
  • ์ธ๊ธฐ ๊ธ€

  • ์ตœ๊ทผ ๋Œ“๊ธ€

  • ์ตœ๊ทผ ๊ธ€

  • hELLOยท Designed By์ •์ƒ์šฐ.v4.10.3
mxnxeonx
[GitLab] Linux CentOS 8 ํ™˜๊ฒฝ GitLab ์„ค์น˜ ๋ฐ ๊ธฐ๋™
์ƒ๋‹จ์œผ๋กœ

ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”