#!
/bin/bash
#Step 1: install minio
# wget
[Link]
_amd64.deb -O [Link]
# sudo dpkg -i [Link]
#Step2: create minio user for running minio service
#Create user and group because [Link] run as minio-user
# sudo groupadd -r minio-user
# sudo useradd -M -r -g minio-user minio-user
#step3: create the driver path usage for minio
#change the owner for driver path that use aims to use with minio
# sudo mkdir -p /mnt/drives-1
# sudo mkdir -p /mnt/drives-1/minio
# sudo chown -R minio-user:minio-user /mnt/drives-1
#TODO: step4: create TSL for https
#Add the TSL
#step5: create minio env file as passing variable to [Link]
sudo bash -c 'cat > /etc/default/minio <<EOF
# 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).
# If you run without TLS, change https -> http
MINIO_VOLUMES="/mnt/drives-1/minio"
# Set all MinIO server command-line 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=minio-secret-key-CHANGE-ME
EOF'
#Step6: start minio service file
sudo systemctl start minio