[GitLab] CentOS 7μ GitLab (ce) μ€μΉνκΈ° - μ€νλΌμΈ(μλ) μ€μΉ
GitLab μ¨λΌμΈ μ€μΉλ μ΄μ μ ν¬μ€ν νμλλ°, μ μ μλ μ΄μ λ‘ curl λͺ λ Ήμ μ¬μ©ν μ μμ΄(무μλ΅) μ€νλΌμΈμΌλ‘ μ€μΉνκ³ μ μμλ΄€λ λ΄μ©λ€μ μ 리νλ€. μ€νλΌμΈ μ€μΉλ λ‘컬μμ μ€μΉ νμΌμ λ°μ μλ²μ λ£κ³ installνλ λ°©μμ΄λ€. λλ¬Έμ μΈν°λ·μ΄ λμ§ μλ μλ² νκ²½μμλ μ€μΉκ° κ°λ₯νλ€.
GitLab μ€νλΌμΈ μ€μΉ λ°©λ² (CentOS 7)
GitLab 곡μ ννμ΄μ§μμ μμ μ OS(컀λ) λ²μ μ λ§λ ν¨ν€μ§ νμΌμ λ€μ΄λ‘λνκ³ Installνλ κ³Όμ μ΄λ€.
1) μ€μΉ νμΌ λ€μ΄λ‘λ
GitLab ceλ²μ ν¨ν€μ§ λ€μ΄λ‘λ ννμ΄μ§μμ μμ μ OS λ²μ μ λ§λ νμΌμ λ€μ΄λ‘λνλ€. λ§μ½ μμ μ OS λ°°ν¬ν λ²μ κ³Ό νΈνλμ§ μλ GitLab ν¨ν€μ§λ₯Ό κ°μ Έμ¨ κ²½μ° μ€μΉ μ€ Dependency λΌμ΄λΈλ¬λ¦¬ λΆμΌμΉ λλ λ―Έμ‘΄μ¬λ‘ μΈν΄ μ€μΉκ° λΆκ°νλ€.
- GitLab ν¨ν€μ§ λ€μ΄λ‘λ λ§ν¬ : https://packages.gitlab.com/gitlab/gitlab-ce/
gitlab/gitlab-ce - Packages · packages.gitlab.com
APT/YUM repository for GitLab Community Edition packages
packages.gitlab.com
μ°Έκ³ ) OS λ²μ νμΈ
λ§μ½ λ³ΈμΈμ OS λ²μ μ λͺ¨λ₯Έλ€λ©΄ μλ²μ μλ λͺ λ Ήμ΄λ€μ μ λ ₯νμ¬ νμΈν μ μλ€.
1. 컀λ λ²μ νμΈ
$ uname # OS νμΈ(Linux, Windows ...)
$ uname -a # OS κ΄λ ¨ λͺ¨λ μ 보 νμΈ
$ uname -r # 컀λ λ²μ νμΈ
uname λͺ λ Ή μ λ ₯μ λμ¨ μΆλ ₯κ°μ 컀λ λ²μ .λ©μ΄μ λ²μ .λ§μ΄λ λ²μ -λ¦΄λ¦¬μ¦ λ²μ .λ°°ν¬ν λ²μ μ΄λ€. 3.10.0-862.el7.x86_64λΌλ©΄ μλμ κ°λ€.
- 컀λ λ²μ : 3
- λ©μ΄μ λ²μ : 10
- λ§μ΄λ λ²μ : 0
- λ¦΄λ¦¬μ¦ λ²μ : 862
- λ°°ν¬νμμ μ§μ ν λ²μ : el7.x86_64
2. Linux λ°°ν¬ν λ²μ νμΈ
$ lsb-release -a
lsb-release -a λͺ λ Ή μ λ ₯μ 'λͺ λ Ήμ μ°Ύμ μ μμ΅λλ€' μλ¬ λ°μνλ κ²½μ° μλμ κ°μ΄ ν¨ν€μ§λ₯Ό μ€μΉνλ€.
μ€μΉκ° μλ£λλ©΄ νμΌ λ΄μ©μ μ½μ΄ λ¦΄λ¦¬μ¦ λ²μ μ νμΈν μ μμ.
$ cat /etc/redhat-release
release νμΌμ μ‘°νν κ²°κ³Όλ‘ CentOS λ²μ μ λ³΄κ° μΆλ ₯λμλλ°, 7.9.2009λ₯Ό ν΄μνλ©΄ λ€μκ³Ό κ°λ€.
- νλ‘μ νΈ λ²μ : 7 (Windows XP, 7, 10, 11κ³Ό κ°μ)
- λ¦΄λ¦¬μ¦ λ²μ : 9 (νλ‘μ νΈ λ¬Έμ μ μ κ°μ λλ μ΅μ ννλ©° λΆμ¬λ λ²μ )
- λ¦΄λ¦¬μ¦ λ μ§ : 2009 (= 20'20'λ '09'μ)
μ‘°κΈ λ μμΈνκ² μ‘°ννκ³ μΆλ€λ©΄ release νμΌμ λͺ¨λ μ½μΌλ©΄ λλ€.
$ cat /etc/*release*
CentOS Linux release 7.9.2009 (Core)
Derived from Red Hat Enterprise Linux 7.9 (Source)
cat: /etc/lsb-release.d: λλ ν°λ¦¬μ
λλ€
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)
cpe:/o:centos:centos:7
νμ¬ λ΄ μλ²μ OS λ²μ (GitLabμμ μꡬνλ κ²μ΄ CentOS λ°°ν¬ν λ²μ )μ el7μ΄λ―λ‘ ce, el7μ μ νν΄μ λ€μ΄λ‘λνλ€.
GitLab ν¨ν€μ§ ννμ΄μ§μμ μνλ λ²μ μ ν΄λ¦νλ©΄ μ°μΈ‘μ λͺ λ Ήμ΄λ₯Ό μ΄μ©ν μ€μΉ λ°©λ²μ΄ νμλλλ°, λ€νΈμν¬ μ°κ²°μ΄ νμνλ€. λμ κ²½μ° curl λͺ λ Ήμ΄ μ μ μλ μ΄μ λ‘ λ¨Ήν΅μ΄ λμ΄.. μλ μ€μΉλ₯Ό νκΈ°λ‘ νμΌλ―λ‘ ν¨μ€νλ€.

λ§μ½ μ¨λΌμΈ μ€μΉλ₯Ό ν¬λ§νλ κ²½μ° ννμ΄μ§μ μ μλ λλ‘ μλ λͺ λ Ήμ μ λ ₯νκ±°λ
$ curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
μ΄μ μ ν¬μ€ν ν μ¨λΌμΈ μ€μΉ κ°μ΄λ μ°Έκ³ !
3. Requires
GitLabμ μ΄μ©νκΈ° μν΄μλ μΆκ° μμ‘΄μ± ν¨ν€μ§κ° νμνλ°, λ²μ μ μ ννλ©΄ μ΄λλλ ννμ΄μ§μ λμ΄λμ΄ μλ€. λ€νΈμν¬λ₯Ό μ΄μ©ν΄μ μ€μΉνλ κ²½μ° yum λͺ λ ΉμΌλ‘ μ½κ² κ°λ₯νλ μ€νλΌμΈμΌλ‘ μ€μΉν κ²½μ° λμΌνκ² λ°μ΄λ리λ₯Ό μ°Ύμ Installν΄μΌν¨. (ν¬μ€ν μ΄ κΈΈμ΄μ§ κ² κ°μ μ΄λΆλΆμ μλ΅)
2) μ€μΉ νμΌ(rpm) Install
λ¨Όμ λ€μ΄λ°μ νμΌ(gitlab-ce-15.10.2-ce.0.el7.x86_64.rpm)μ μλ²μ μ¬λ¦°λ€. μμΉλ νΈμμ ν λλ ν 리 μλλ‘ μ§μ νμλ€. 1-2GB μ λμ μμ§λ μμ νμΌμ΄λΌ μκ°μ΄ μ‘°κΈ μμλλλ°, νμΌ μ λ‘λκ° μλ£λμλ€λ©΄ μλ λͺ λ Ήμ μ λ ₯νμ¬ GitLabμ Installνλ€.
$ cd {rpm νμΌμ μ
λ‘λν λλ ν 리}
$ sudo yum install gitlab-ce-15.10.2-ce.0.el7.x86_64.rpm
μ μ₯μμμ ν¨ν€μ§λ₯Ό κ²μνμ¬ μ€μΉνλ κ²μ΄ μλλΌ, μλ²μ μ λ‘λν ν¨ν€μ§ νμΌλ‘ μ€μΉνλ κ²μ΄λ―λ‘ ν΄λΉ μμΉμμ νμΌλͺ μ νμ₯μκΉμ§ μ ννκ² μ λ ₯νμ¬ μ€μΉν΄μΌ νλ€. μ€μΉνκ² λλ λ©μμ§κ° λ¨λ©΄ 'y' μ λ ₯ν΄ μ€μΉλ₯Ό μμνλ€.
μ€μΉκ° μλ£λλ©΄ GitLab μμ΄μ½μ΄ κ·Έλ €μ§ νλ €ν ν°λ―Έλμ λ³Ό μ μλ€.
3) GitLab μ μμ μν μ€μ
GitLab μ€μ μ gitlab.rb νμΌμ μμ ν΄μΌ νλ€.
$ sudo vi /etc/gitlab/gitlab.rb
# external_url 'http://gitlab.example.com' << μ£Όμμ²λ¦¬
external_url 'http://{IP}:{Port}' # GitLab μλ² IP, Port
puma['listen'] = '127.0.0.1' # μ£Όμ ν΄μ
puma['port'] = 9001 # μ£Όμ ν΄μ , μνλ Listen Port
μ€μ νμΌ μμ μ΄ μλ£λμλ€λ©΄ λ³κ²½μ μ λ°μν΄μΌ νλ€. λ§μ λ©μμ§μ ν¨κ» κ½€λ κΈ΄ μκ°μ΄ μμλλ€.
$ sudo gitlab-ctl reconfigure
gitlab Reconfigured! λ©μμ§κ° μΆλ ₯λλ©΄ μ€μ λ°μμ΄ μλ£λ κ²μ΄λ€.
κΉλ© μλΉμ€λ₯Ό μ¬μμνλ€.
$ sudo gitlab-ctl restart
$ sudo gitlab-ctl status
4) GitLab μ μ
GitLabμ Githubμ²λΌ μΉμ μ μν΄μ μ¬μ©νλ λ°©μμ΄λ€. λ€λ§ μλ²μ μ€μΉνμ¬ μ§μ κ΄λ¦¬νλ€λ μ μ΄ μ°¨μ΄μ !
- GitLab URL : gitlab.rb νμΌμ external_url μ΅μ μ μμ±ν URL (http://192.168.208.146:9000)
μ΄κΈ° λΉλ°λ²νΈλ μλ² λ΄μ νμΌλ‘ μ μ₯λμ΄ μλ€. (ID : root)
$ sudo cat /etc/gitlab/initial_root_password
# 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: JVGJ6gama4zo828Y0N2eUYaX0Nr1fGc2z+flDtCATO4=
# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
root κ³μ λΉλ°λ²νΈλ Menu > Admin > Admin Area > Overview > Users > Active > Name > Administrator > Edit μμλ‘ λ©λ΄λ₯Ό ν΄λ¦νμ¬ λ³κ²½ν μ μλ€.