Just Sharing Knowledge on Robotics, Electronics and Programming

Saturday, March 7, 2020

Instalation and Configuration Minio Storage Server in Linux Ubuntu 18.04




1. Download minio
wget https://dl.min.io/server/minio/release/linux-amd64/minio
2. Install Minio
 chmod +x minio
./minio server /data
3. Change Credential
export MINIO_ACCESS_KEY=YQWERTYU12RHJW2YJASD
export MINIO_SECRET_KEY= xH+Qwerty+ASDF+HDd7DRNOFvl7sL8ASDFjwZXCg
4. Run server
./minio server /data
5. Monit Configuration

  check process minio
        matching minio
        start program = "/bin/bash -c '/root/minio.py start'"
        stop program = "/bin/bash -c '/root/minio.py stop'"
        if cpu usage > 95% for 10 cycles then restart 
6.  Python minio.py
#!/usr/bin/python2
import sys
import os
action = sys.argv[1]
if action == 'start':
    os.system("export MINIO_ACCESS_KEY=YQWERTYU12RHJW2YJASD \n export MINIO_SECRET_KEY=xH+Qwerty+ASDF+HDd7DRNOFvl7sL8ASDFjwZXCg \n /root/minio server /data")
if action == 'stop':
    os.system("kill -9 $(pgrep minio)")


7. Change permision of minio.py file
chmod +x minio.py

8. Restart Monit
 systemctl restart monit

9. Status Monit Check
 systemctl status monit

0 comments:

Post a Comment