---
# System prepended metadata

title: Ubuntu 22.04 install gitlab-ee
tags: [gitlab, ubuntu]

---

---
title: 'Ubuntu 22.04 install gitlab-ee'
tags: gitlab,ubuntu
description: Ubuntu 22.04 install gitlab-ee
---

# Ubuntu 22.04 install gitlab-ee

---

[TOC]

---

## 使用的技術&工具

- Ubuntu 22.04
- Gitlab-ee


---

## Ubuntu 更新指令

``` terminal
sudo apt update
sudo apt upgrade
```

---

## 安裝基本工具

``` terminal
sudo apt install -y ca-certificates curl openssh-server
```

---

## 設定Ubuntu gitlab list
``` terminal
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
```

備註:出現這個錯誤
``` terminal
curl: (35) error:0A000152:SSL routines::unsafe legacy renegotiation disabled
```

``` terminal
sudo vim /usr/lib/ssl/openssl.cnf
```
請在下面新增設定
``` terminal
[system_default_sect]
...
Options = UnsafeLegacyRenegotiation
```
---
## 安裝Gitlab-ee
``` terminal
sudo apt install gitlab-ee -y
```

---
## 設定Gitlab domain || IP
``` terminal
sudo vim /etc/gitlab/gitlab.rb
```
注意:請設定最終要來進來的domain || IP
``` terminal
...
external_url 'http://localhost:80/'
...
```
設定完後請下底下的指令
``` terminal
sudo gitlab-ctl reconfigure
```
查看Gitlab status
``` terminal
sudo gitlab-ctl status
```

---
## 瀏覽Gitlab頁面

http://localhost/

---
## 設定root密碼
``` terminal
sudo gitlab-rake "gitlab:password:reset"
```

---