---
# System prepended metadata

title: '**GitLab 安裝**'
tags: [CICD, Micro-service, GitLab, 自動化佈署]

---

# **GitLab 安裝**

## **1. 安裝 GitLab 相依套件**
```bash=
$sudo yum install -y curl openssh-server perl
$sudo yum -y install postfix
$sudo systemctl enable postfix
$sudo systemctl start postfix
$sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
```
## **2. 安裝 GitLab 套件**
```bash=
$sudo yum install -y gitlab-ce
```
## **3. 調整 GitLab 配置檔**
```bash=
$sudo vi /etc/gitlab/gitlab.rb
```
```
EXTERNAL_URL=http://gitlab.brmaker.info
```
```bash=
$sudo gitlab-ctl reconfigure
```
## **4. 第一次登入 GitLab 管理介面**
:::success
以瀏覽器鍵入 http://your_ip_address:8080
:::



###### tags: `自動化佈署` `GitLab` `CICD` `Micro-service`