---
title: "Hướng dẫn cài đặt Minio trên Almalinux"
description: "Đầu tiên chúng ta cùng tìm hiểu Minio là gì một cách ngắn gọn. Đây là định nghĩa ở trang chủ của minio:"
featured_image: "https://legiang360.com/wp-content/uploads/2024/01/Le-Giang-Web-minio.png"
url: "https://legiang360.com/huong-dan-cai-dat-minio-tren-almalinux/"
date_modified: "2025-06-07T11:51:05+07:00"
---

# Hướng dẫn cài đặt Minio trên Almalinux

![Lê giang web minio](https://legiang360.com/wp-content/uploads/2024/01/Le-Giang-Web-minio.png)

# Hướng dẫn cài đặt Minio trên Almalinux

- [sieunhim](https://legiang360.com/author/sieunhim/)
- 18.01.2024
- [Tút](https://legiang360.com/category/vps/tut/)

## Minio là gì ?

Đầu tiên chúng ta cùng tìm hiểu Minio là gì một cách ngắn gọn. Đây là định nghĩa ở trang chủ của minio:

> Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure.

Ngắn gọn mà nói thì câu trả lời là: **Nó giống như dịch vụ AWS S3, nhưng được host local**.

Minio là một object storage server được implement những public API giống như AWS S3. Điều đó có nghĩa là những ứng dụng có thể config để giao tiếp với Minio thì cũng có thể giao tiếp với AWS S3. Là một server lưu trữ object nên có thể được sử dụng để lưu trữ những unstructured data như ảnh, video, log files, backups và container/VM images. Dung lượng của 1 object có thể dao động từ một vài KB tới tối đa là 5TB. File cũng được gom lại trong 1 buckets, nó là được chỉ cùng với access key khi dùng app. Đây là giao diện của minio:

![](https://legiang360.com/wp-content/uploads/2024/01/Minio-Screenshot-1-Minio-Browser.jpg)

## Cách cài đặt Minio

Tìm hiểu sơ sơ nó là gì, các bạn đến bài này chắc cũng biết nó là gì rồi. GIờ vô cài đặt thôi. Nhưng lưu ý bản này chỉ là bản cài cơ bản trên 1 node, 1 disk, dùng cá nhân, còn thương mại sẽ cần cấu hình dạng multi node và multi disk

### Yêu cầu phần cứng (đề xuất)

- CPU: 4 core
- Ram: 8GB
- Disk: 100GB
- Network Speed: Càng nhanh càng tốt
- Hệ điều hành: Almalinux / Ubuntu

### Quá trình cài đặt

Để cài đặt, yêu cầu hệ điều hành chưa cài gì nhé.

#### 1. Cập nhật OS

Chúng ta login và SSH rồi chạy các lệnh sau:

```
dnf -y update
dnf -y install wget
```

#### 2. Tải source và cài đặt

Chúng ta chạy lệnh sau để tải source và phân quyền

```
wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio
sudo chmod +x /usr/local/bin/minio
```

Set selinux cho file của minio

```
sudo restorecon -v /usr/local/bin/minio
```

Kiểm tra phiên bản minio đã cài đặt

```
minio --version
```

#### 3. Cấu hình Minio

**Tạo user và set quyền cho user minio**

```
sudo useradd -r minio-user -s /sbin/nologin
sudo chown minio-user:minio-user /usr/local/bin/minio
```

Tạo thư mục chứa file cấu hình minio và phân quyền cho thư mục cấu hình

```
sudo mkdir /etc/minio
sudo chown minio-user:minio-user /etc/minio
```

Phân quyền minio vào thư mục / disk lưu trữ data

```
sudo chown minio-user:minio-user /mnt/data
```

Nếu chưa có thư mục /mnt/data thì ta chạy lệnh sau để tạo rồi chạy lại lệnh trên

```
mkdir /mnt/data
```

**Tạo môi trường chạy minio**

Để tạo môi trường, chúng ta chạy lệnh sau:

```
sudo nano /etc/default/minio
```

Sau đó thêm nội dung sau vào, rồi bấm Ctrl + O để lưu, Ctrl + X để thoát

```
MINIO_VOLUMES="/mnt/data"
MINIO_OPTS="-C /etc/minio --address :9000 --console-address :9001"
MINIO_ROOT_USER="minio"
MINIO_ROOT_PASSWORD="ChooseAStrongPassword"
```

Trong đó có 2 thông số quan trọng là

- MINIO_ROOT_USER: Tài khoản quản lý minio sẽ dùng
- MINIO_ROOT_PASSWORD: Nhập mật khẩu tài khoản quản lý

#### 4. Cấu hình dịch vụ Minio

Tải file cấu hình dịch vụ và phần quyền selinux

```
wget https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service -O /etc/systemd/system/minio.service
sudo restorecon -v /etc/systemd/system/minio.service
```

Reload lại hệ thống dịch vụ

```
sudo systemctl daemon-reload
```

Khởi chạy Minio và set khởi động cùng hệ thống

```
sudo systemctl enable minio
sudo systemctl start minio
```

#### 5. Cài nginx proxy để thêm domain và SSL cho domain

**Cài đặt nginx**

```
dnf -y install nginx
systemctl enable nginx
```

**Thêm tên miền**

Chúng ta chạy lệnh sau *(sửa tenmien.com thành tên miền của bạn)*:

```
nano /etc/nginx/conf.d/tenmien.com.conf
```

Sau đó thêm cấu hình bên dưới rồi bấm Ctrl + O để lưu và Ctrl + X để thoát. *Lưu ý: ở dòng server_name, đổi tenmien.com thành tên miền của bạn*

```
upstream minio {
   server 127.0.0.1:9000;
}
upstream minio_ui {
   least_conn;
   server 127.0.0.1:9001;
}
server {
    listen 80;
    server_name tenmien.com;

    # Allow special characters in headers
    ignore_invalid_headers off;
    # Allow any size file to be uploaded.
    # Set to a value such as 1000m; to restrict file size to a specific value
    client_max_body_size 0;
    # Disable buffering
    proxy_buffering off;
    proxy_request_buffering off;

	location / {
	   proxy_pass http://minio;
	       proxy_set_header Host $http_host;
		  proxy_set_header X-Real-IP $remote_addr;
		  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		  proxy_set_header X-Forwarded-Proto $scheme;

		  proxy_connect_timeout 300;
		  # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
		  proxy_http_version 1.1;
		  proxy_set_header Connection "";
		  chunked_transfer_encoding off;
	}
	location /admin/ {
		rewrite ^/admin/(.*) /$1 break;
	    proxy_set_header Host $http_host;
	    proxy_set_header X-Real-IP $remote_addr;
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	    proxy_set_header X-Forwarded-Proto $scheme;
	    proxy_set_header X-NginX-Proxy true;

	    # This is necessary to pass the correct IP to be hashed
	    real_ip_header X-Real-IP;

	    proxy_connect_timeout 300;

	   # To support websockets in MinIO versions released after January 2023
	   proxy_http_version 1.1;
	   proxy_set_header Upgrade $http_upgrade;
	   proxy_set_header Connection "upgrade";
	   # Some environments may encounter CORS errors (Kubernetes + Nginx Ingress)
	   # Uncomment the following line to set the Origin request to an empty string
	   # proxy_set_header Origin '';

	   chunked_transfer_encoding off;
	   proxy_pass http://minio_ui;
	}
}
```

**Điều chỉnh cấu hình môi trường**

Ta chạy lệnh sau để sửa cấu hình môi trường:

```
sudo nano /etc/default/minio
```

Chúng ta sửa như bên dưới rồi bấm Ctrl + O để lưu và Ctrl + X để thoát. *Lưu ý: ở 2 dòng cuối, đổi tenmien.com thành tên miền của bạn*

```
MINIO_VOLUMES="/mnt/data"
MINIO_OPTS="-C /etc/minio --address :9000 --console-address :9001"
MINIO_ROOT_USER="minio"
MINIO_ROOT_PASSWORD="ChooseAStrongPassword"
MINIO_SERVER_URL="https://tenmien.com"
MINIO_BROWSER_REDIRECT_URL="https://tenmien.com/admin/"
```

**Cài đặt certbot và SSL cho tên miền**

```
dnf -y install certbot python3-certbot-nginx
certbot --nginx -d tenmien.com
```

**Khởi chạy lại minio và nginx**

```
systemctl restart minio
systemctl restart nginx
```

Nếu restart nginx bị lỗi, các bạn chạy lệnh sau

```
sudo fuser -k 80/tcp
sudo fuser -k 443/tcp
systemctl restart nginx
```

Như vậy là xong. Để truy cập Minio chúng ta truy cập đường link https://tenmien.com là được.

![](https://legiang.io.vn/wp-content/uploads/2024/01/Le-Giang-Web-image-1024x463.png)

Chúc các bạn thực hiện thành công.

4.4/5 - (8 bình chọn)

#### Bài viết liên quan

[!\[\](https://legiang360.com/wp-content/uploads/2026/07/wazuh-768x432.jpg)](https://legiang360.com/cai-dat-wazuh-server-tren-almalinux-9/)

#### [Cài đặt wazuh server trên Almalinux 9](https://legiang360.com/cai-dat-wazuh-server-tren-almalinux-9/)

[!\[Adguard\](https://legiang360.com/wp-content/uploads/2025/06/adguard-768x432.webp)](https://legiang360.com/cu-phap-viet-lai-adguard-home-dns/)

#### [Cú pháp viết lại AdGuard Home DNS](https://legiang360.com/cu-phap-viet-lai-adguard-home-dns/)

[!\[Image\](https://legiang360.com/wp-content/uploads/2026/01/image-1-768x403.png)](https://legiang360.com/cai-dat-monarx-trinh-bao-mat-vps-mien-phi/)

#### [Cài đặt Monarx – Trình bảo mật VPS miễn phí](https://legiang360.com/cai-dat-monarx-trinh-bao-mat-vps-mien-phi/)

[!\[Good website security plan\](https://legiang360.com/wp-content/uploads/2026/01/good-website-security-plan.jpg)](https://legiang360.com/mot-so-lenh-co-ban-kiem-tra-server-khi-bi-ddos/)

#### [Một số lệnh cơ bản kiểm tra server khi bị DDoS](https://legiang360.com/mot-so-lenh-co-ban-kiem-tra-server-khi-bi-ddos/)

[!\[CSF\](https://legiang360.com/wp-content/uploads/2026/01/CSF-768x396.png)](https://legiang360.com/%f0%9f%93%96-huong-dan-day-du-chan-truy-cap-theo-quoc-gia-bang-csf-tren-directadmin-su-dung-db-ip/)

#### [📖 Hướng dẫn đầy đủ: Chặn truy cập theo quốc gia bằng CSF trên DirectAdmin (sử dụng DB-IP)](https://legiang360.com/%f0%9f%93%96-huong-dan-day-du-chan-truy-cap-theo-quoc-gia-bang-csf-tren-directadmin-su-dung-db-ip/)

[!\[Setup caddy web server on ubuntu zlj795\](https://legiang360.com/wp-content/uploads/2025/12/setup-caddy-web-server-on-ubuntu_zlj795-768x384.jpg)](https://legiang360.com/cai-dat-wordpress-bang-web-server-caddy-giai-phap-hien-dai-thay-the-nginx/)

#### [Cài đặt WordPress bằng web server Caddy – Giải pháp hiện đại thay thế Nginx](https://legiang360.com/cai-dat-wordpress-bang-web-server-caddy-giai-phap-hien-dai-thay-the-nginx/)

![](https://legiang360.com/wp-content/uploads/2026/05/photo_2026-05-27_01-59-38-630x630.jpg)
