Installing MinIO Object Storage on Linux for Enterprise Use Cases

Official Resources

  • Chinese site: https://www.minio.org.cn/
  • English site: https://min.io/

Package Installation

Install MinIO using a local RPM file:

rpm -ivh minio-20241107005220.0.0-1.x86_64.rpm

Or directly from the remote repository:

rpm -ivh https://dl.minio.org.cn/server/minio/release/linux-amd64/minio-20241107005220.0.0-1.x86_64.rpm

Systemd Service Configuration

Create /etc/systemd/system/minio.service with the following content:

[Unit]
Description=MinIO Object Storage
Documentation=https://min.io/docs/minio/linux/index.html
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local
User=minio-account
Group=minio-account
ProtectProc=invisible

EnvironmentFile=-/etc/minio/config
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"MINIO_VOLUMES not configured in /etc/minio/config\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
Restart=always
LimitNOFILE=65536
TasksMax=infinity
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

Storage Preparation and User Setup

Single Drive Setup

mkdir -p /storage/volume1/minio-data

Multi-Drive Setup

  1. Attach drives to the system. Use identical drive types and capacities across all nodes.
  2. Identify drives with fdisk -l.
  3. Format each drive with XFS and assign labels:
mkfs.xfs /dev/sdb -L STORAGE1
mkfs.xfs /dev/sdc -L STORAGE2
mkfs.xfs /dev/sdd -L STORAGE3
mkfs.xfs /dev/sde -L STORAGE4
  1. Create mount points:
mkdir -p /storage/volume{1..4}/minio-data
  1. Mount drives:
mount /dev/sdb /storage/volume1/minio-data
mount /dev/sdc /storage/volume2/minio-data
mount /dev/sdd /storage/volume3/minio-data
mount /dev/sde /storage/volume4/minio-data
  1. Add to /etc/fstab for automatic mounting:
LABEL=STORAGE1    /storage/volume1    xfs    defaults,noatime    0 2
LABEL=STORAGE2    /storage/volume2    xfs    defaults,noatime    0 2
LABEL=STORAGE3    /storage/volume3    xfs    defaults,noatime    0 2
LABEL=STORAGE4    /storage/volume4    xfs    defaults,noatime    0 2

Create Dedicated User and Set Permissions

groupadd -r minio-account
useradd -M -r -g minio-account minio-account
chown -R minio-account:minio-account /storage/volume1/minio-data

Environment Configuration

Create the configuration directory and file:

mkdir -p /etc/minio

Edit /etc/minio/config:

# Administrative credentials
MINIO_ROOT_USER=administrator
MINIO_ROOT_PASSWORD=SecurePass#2024

# Web console endpoint
MINIO_OPTS="--console-address :9001"

# Single drive path
MINIO_VOLUMES="/storage/volume1/minio-data"

# Multi-drive configuration (commented)
# MINIO_VOLUMES="/storage/volume{1..4}/minio-data"

Service Management

Reload systemd and enable automatic startup:

systemctl daemon-reload
systemctl enable minio
systemctl start minio

Multi-Node Multi-Drive Deployment

Prerequisites

Configure four consecutive domain names:

  • node1.minio-cluster.local
  • node2.minio-cluster.local
  • node3.minio-cluster.local
  • node4.minio-cluster.local

Load Balancer Setup with Nginx

Set up Nginx as a reverse proxy and load balancer for the cluster. Configure it to handle traffic for https://cluster.minio.local on ports 9000 (service) and 9001 (console).

Node Configuration

On each node, modify /etc/minio/config:

MINIO_ROOT_USER=administrator
MINIO_ROOT_PASSWORD=SecurePass#2024
MINIO_OPTS="--console-address :9001"
MINIO_VOLUMES="https://node{1..4}.minio-cluster.local:9000/storage/volume{1..4}/minio-data"
MINIO_SERVER_URL="https://cluster.minio.local:9000"

Verification and Access

Check service status on all nodes:

systemctl status minio
journalctl -f -u minio

Access the web console at https://cluster.minio.local:9001 and the service endpoint at https://cluster.minio.local:9000.

Nginx Proxy Configuraton Example

server {
    server_name cluster.minio.local;
    listen 80;
    listen 443 ssl;

    ssl_certificate /etc/nginx/ssl/cluster.minio.local.crt;
    ssl_certificate_key /etc/nginx/ssl/cluster.minio.local.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    gzip on;
    gzip_min_length 1k;
    gzip_types text/plain application/json application/javascript;

    client_max_body_size 5G;
    proxy_read_timeout 600;

    location / {
        proxy_pass http://backend_servers;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
    }
}

Removal Procedure

Stop the service and delete associated files:

systemctl stop minio
rm -rf /etc/minio/config
rm -rf /storage/volume1/minio-data
rm -f /usr/local/bin/minio

Tags: MinIO Object Storage Linux Installation Distributed Storage Systemd Configuration

Posted on Fri, 21 Aug 2026 16:11:15 +0000 by im8kers