Skip to main content

HOW TO INSTALL MINIO ON ROCKY LINUX 8

Prerequisites

  • An Rocky Linux system.
  • A user with root or sudo privileges. This user will be used for installing new packages and make changes system-wide.

InstallingDownloading MinIO on Rocky Linux

Use the following command to rundownload a standalone MinIO server on Linux hosts running 64-bit Intel/AMD architectures. Replace Replace /data with the path to the drive or directory in which you want MinIO to store data.

dnf -y install wget
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mkdir /data
.mv minio /miniousr/local/bin

Create default configuration

  • This file serves as input to MinIO systemd service. Use this file to add MINIO_VOLUMES with the correct paths, MINIO_OPTS to add MinIO server options like certs-dir, address. MinIO credentials can be MINIO_ROOT_USER and MINIO_ROOT_PASSWORD in this file as well.
  • Run the command bellow to create the file with minio parameters.
cat <<EOT >> /etc/default/minio
# Volume to be used for MinIO server.
MINIO_VOLUMES="/data"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :9199"
# Root user for the server.
MINIO_ROOT_USER=spf-user
# Root secret for the server.
MINIO_ROOT_PASSWORD=spf-Password
# setting access key to access the interface web
MINIO_ACCESS_KEY="minio"
# setting secret key. Avoid using the value default from this tutorial.
MINIO_SECRET_KEY="miniostorage"

EOT

Creating minio user to run the systemd

  • creating the user with no shell login and change binary and data directory ownership
useradd -r minio-user -s /sbin/nologin
chown minio-user:minio-user /usr/local/bin/minio
chown minio-user:minio-user /data
Result:

 

API:

Systemd http:service MinIO on Rocky Linux

  • Systemd script is configured to run the binary from /usr/local/bin
  • Create minio.service in /192.168.0.170:9000etc/systemd/system/
  • http://127.0.0.1:9000
[Unit]
RootUser:Description=MinIO
minioadmin 
RootPass: minioadmin 

Console: http://192.168.0.170:32889 http://127.0.0.1:32889   
RootUser: minioadmin 
RootPass: minioadmin 

Command-line: https://docs.min.io/docs/minio-client-quickstart-guide
   $ mc alias set myminio http://192.168.0.170:9000 minioadmin minioadmin

Documentation: Documentation=https://docs.min.io
WARNING:Wants=network-online.target
ConsoleAfter=network-online.target
endpointAssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local/

User=minio-user
Group=minio-user

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 listeningstopped
onTimeoutStopSec=infinity
aSendSIGKILL=no

dynamic[Install]
portWantedBy=multi-user.target

# Built for ${project.name}-${project.version} (32889), please use --console-address ":PORT" to choose a static port.
WARNING: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables${project.name})

The Enable MinIO deployment starts using default root credentials minioadmin:minioadmin. You can test the deployment using the MinIO Console, an embedded web-based object browser built into MinIO Server. Point a web browser runningstartup on the host machine to http://127.0.0.1:9000 and log in with the root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server.boot

systemctl daemon-reload
systemctl enable minio

YouStarting can also connect using any S3-compatible tool, such as the MinIO Client mc commandline tool.
minio

systemctl start minio

image-1636415567865.png