Install MinIO Object Storage on AlmaLinux 8 / RockyLinux 8

Install MinIO Object Storage pada AlmaLinux 8 / RockyLinux 8

  • Update repository dan sistem
yum update -y && yum install wget nano -y
  • Download dan install MinIO
wget https://dl.min.io/server/minio/release/linux-amd64/minio
cp minio /usr/local/bin/ && chmod +x /usr/local/bin/minio
  • Konfigurasi MinIO
  • Tambahkan isi file berikut pada file: /etc/default/minio
  • Ganti user dan password
nano /etc/default/minio
# Volume to be used for Minio server.
MINIO_VOLUMES="/tmp/minio/"

# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :9000 --console-address :9001"

# Root user for the server. 
MINIO_ROOT_USER=admin
# Root secret for the server. 
MINIO_ROOT_PASSWORD=P@ssw0rd!
  • Buat user baru untuk mengatur service MinIO dan ganti permission file
useradd -s /sbin/nologin -d /minio minio
chmod 755 /usr/local/bin/minio
chown minio:minio /usr/local/bin/minio
chown minio:minio /etc/default/minio
  • Buat service file untuk MinIO
nano /etc/systemd/system/minio.service
[Unit]
Description=Minio
Documentation=https://docs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local/

User=minio
Group=minio

EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"

ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES

# Let systemd restart this service always
Restart=always

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})
  • Reload systemd dan aktifkan service MinIO
systemctl daemon-reload
systemctl enable --now minio.service
systemctl status minio.service

  • Akses MinIO dashboard lewat web browser dengan url: http://ip_address:9001
  • Login dengan user dan password yang ada pada file /etc/default/minio
  • Buat user dan group pada MinIO
  • Buat bucket baru pada MinIO
  • Akses ke dalam bucket dan upload file ke dalam bucket
  • Buat access key agar bucket bisa mengakses lewat S3 browser

herdiana3389

A system administrator with skills in system administration, virtualization, linux, windows, networking, cloud computing, container, etc.