All the below commands should be run on all nodes.

First, let’s prepare the firewall

firewall-cmd --permanent --zone=public --add-port=9000/tcp
firewall-cmd --permanent --zone=public --add-port=9001/tcp
firewall-cmd --reload

Check if time is synchronized across all nodes

date

Considering you already added the required data disks on all VMs, create the filesystem on all of them.

mkfs.xfs /dev/sdb -L DISK1
mkfs.xfs /dev/sdc -L DISK2
mkfs.xfs /dev/sdd -L DISK3

Create folders for mount points

mkdir /mnt/disk1
mkdir /mnt/disk2
mkdir /mnt/disk3

Mount them using fstab

vi /etc/fstab

LABEL=DISK1      /mnt/disk1     xfs     defaults,noatime  0       2
LABEL=DISK2      /mnt/disk2     xfs     defaults,noatime  0       2
LABEL=DISK3      /mnt/disk3     xfs     defaults,noatime  0       2

Mount and verify

mount -a
df -h

If required, install wget and then download and install MinIO rpm

yum install wget
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20230504214430.0.0.x86_64.rpm -O minio.rpm
dnf install minio.rpm

Create new minio user, add to minio group and change owner for the previously mounted disks.

groupadd -r minio-user
useradd -M -r -g minio-user minio-user
chown minio-user:minio-user /mnt/disk1 /mnt/disk2 /mnt/disk3

Create minio configuration file

vi /etc/default/minio

Add the following configuration to /etc/default/minio (change it accordingly).

# Set the hosts and volumes MinIO uses at startup
# The command uses MinIO expansion notation {x...y} to denote a
# sequential series.
#
# The following example covers four MinIO hosts
# with 4 drives each at the specified hostname and drive locations.
# The command includes the port that each MinIO server listens on
# (default 9000)

MINIO_VOLUMES="https://minio-prod-0{1...5}.xas.local:9000/mnt/disk{1...3}/minio"

# Set all MinIO server options
#
# The following explicitly sets the MinIO Console listen address to
# port 9001 on all network interfaces. The default behavior is dynamic
# port selection.

MINIO_OPTS="--console-address :9001"

# Set the root username. This user has unrestricted permissions to
# perform S3 and administrative API operations on any resource in the
# deployment.
#
# Defer to your organizations requirements for superadmin user name.

MINIO_ROOT_USER=minioadmin

# Set the root password
#
# Use a long, random, unique string that meets your organizations
# requirements for passwords.

MINIO_ROOT_PASSWORD=MINIOadminPASSWORD     ##change it

# Set to the URL of the load balancer for the MinIO deployment
# This value *must* match across all MinIO servers. If you do
# not have a load balancer, set this value to to any *one* of the
# MinIO hosts in the deployment as a temporary measure.
MINIO_SERVER_URL="https://s3-prod.xas.local:9000"  #This should be behind a network load balancer

If using SSL, copy the certs on all nodes:

scp CAs/public.crt [email protected]:/home/minio-user/.minio/certs/CAs/public.crt
scp public.crt [email protected]:/home/minio-user/.minio/certs/public.crt
scp private.key [email protected]:/home/minio-user/.minio/certs/private.key
...
scp CAs/public.crt [email protected]:/home/minio-user/.minio/certs/CAs/public.crt
scp public.crt [email protected]:/home/minio-user/.minio/certs/public.crt
scp private.key [email protected]:/home/minio-user/.minio/certs/private.key

And change ownership, if necessary

 chown minio-user:minio-user /home/minio-user/.minio/certs/CAs/public.crt
 chown minio-user:minio-user /home/minio-user/.minio/certs/public.crt
 chown minio-user:minio-user /home/minio-user/.minio/certs/private.key

Start and enable minio service

systemctl enable minio.service
systemctl start minio.service

That’s all, you can now access the MinIO console on https://s3-prod.xas.local:9001

Leave a Reply