Cara Install Minio di Ubuntu Server | alvianaufan

BLOG IT SYSADMIN

Daftar akun digitalocean untuk mendapatkan free credit 100$.
DigitalOcean Referral Badge

Apa itu Minio – Object Storage ?

Minio adalah sebuah object storage opensource yang digunakan untuk menyimpan data seperti foto, video, document, dll didalam sebuah source yang disebut “Bucket”  untuk menampung object yang akan disimpan.



Object Storage adalah teknologi yang mengelola data sebagai objek. Semua data disimpan dalam satu repositori besar yang dapat didistribusikan ke beberapa perangkat penyimpanan fisik tanpa harus dibagi ke dalam file atau folder.

Berikut langkah instalasi Minio di Ubuntu Server:

  1. Download minio terbaru dengan command:
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230809233022.0.0_amd64.deb -O minio.deb
    wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230809233022.0.0_amd64.deb -O minio.deb
    wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230809233022.0.0_amd64.deb -O minio.deb
  2. Install minio:
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    sudo dpkg -i minio.deb
    sudo dpkg -i minio.deb
    sudo dpkg -i minio.deb
  3. Buat file systemd untuk menjalankan service minio:
    nano /usr/lib/systemd/system/minio.service
    nano /usr/lib/systemd/system/minio.service
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    [Unit]
    Description=MinIO
    Documentation=https://min.io/docs/minio/linux/index.html
    Wants=network-online.target
    After=network-online.target
    AssertFileIsExecutable=/usr/local/bin/minio
    [Service]
    WorkingDirectory=/usr/local
    User=minio-user
    Group=minio-user
    ProtectProc=invisible
    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
    # MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=)
    # This may improve systemctl setups where other services use `After=minio.server`
    # Uncomment the line to enable the functionality
    # Type=notify
    # Let systemd restart this service always
    Restart=always
    # Specifies the maximum file descriptor number that can be opened by this process
    LimitNOFILE=65536
    # Specifies the maximum number of threads this process can create
    TasksMax=infinity
    # 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})
    [Unit] Description=MinIO Documentation=https://min.io/docs/minio/linux/index.html Wants=network-online.target After=network-online.target AssertFileIsExecutable=/usr/local/bin/minio [Service] WorkingDirectory=/usr/local User=minio-user Group=minio-user ProtectProc=invisible 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 # MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=) # This may improve systemctl setups where other services use `After=minio.server` # Uncomment the line to enable the functionality # Type=notify # Let systemd restart this service always Restart=always # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=65536 # Specifies the maximum number of threads this process can create TasksMax=infinity # 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})
    [Unit]
    Description=MinIO
    Documentation=https://min.io/docs/minio/linux/index.html
    Wants=network-online.target
    After=network-online.target
    AssertFileIsExecutable=/usr/local/bin/minio
    
    [Service]
    WorkingDirectory=/usr/local
    
    User=minio-user
    Group=minio-user
    ProtectProc=invisible
    
    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
    
    # MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=)
    # This may improve systemctl setups where other services use `After=minio.server`
    # Uncomment the line to enable the functionality
    # Type=notify
    
    # Let systemd restart this service always
    Restart=always
    
    # Specifies the maximum file descriptor number that can be opened by this process
    LimitNOFILE=65536
    
    # Specifies the maximum number of threads this process can create
    TasksMax=infinity
    
    # 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})

    – save dan exit.

  4. Buat user dan group dengan nama minio-user:
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    groupadd -r minio-user
    useradd -M -r -g minio-user minio-user
    cd /
    mkdir -p mnt/{data,disk1,disk2,disk3,disk4}
    chown minio-user:minio-user /mnt/data /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4
    groupadd -r minio-user useradd -M -r -g minio-user minio-user cd / mkdir -p mnt/{data,disk1,disk2,disk3,disk4} chown minio-user:minio-user /mnt/data /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4
    groupadd -r minio-user
    useradd -M -r -g minio-user minio-user
    cd /
    mkdir -p mnt/{data,disk1,disk2,disk3,disk4}
    chown minio-user:minio-user /mnt/data /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4
  5. Buat file environment untuk mengatur user & password, volumes path, dan menentukan port web minio yang akan berjalan di browser.
    nano /etc/default/minio
    nano /etc/default/minio
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    #set object storage path folder
    MINIO_VOLUMES="/mnt/data"
    #ganti port 9001 dengan port lain yang belum digunakan
    MINIO_OPTS="--certs-dir /home/minio-user/.minio/certs/ --console-address :9001"
    #set user login
    MINIO_ROOT_USER=alvian
    #set password login
    MINIO_ROOT_PASSWORD=minio123
    #set object storage path folder MINIO_VOLUMES="/mnt/data" #ganti port 9001 dengan port lain yang belum digunakan MINIO_OPTS="--certs-dir /home/minio-user/.minio/certs/ --console-address :9001" #set user login MINIO_ROOT_USER=alvian #set password login MINIO_ROOT_PASSWORD=minio123
    #set object storage path folder
    MINIO_VOLUMES="/mnt/data"
    
    #ganti port 9001 dengan port lain yang belum digunakan
    MINIO_OPTS="--certs-dir /home/minio-user/.minio/certs/ --console-address :9001"
    
    #set user login
    MINIO_ROOT_USER=alvian
    
    #set password login
    MINIO_ROOT_PASSWORD=minio123

    – save dan exit.

  6. Jalankan service minio:
    sudo systemctl start minio.service
    sudo systemctl start minio.service
  7. Cek status:
    sudo systemctl status minio.service
    sudo systemctl status minio.service
    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    Status: 1 Online, 0 Offline.
    API: http://192.168.2.100:9000 http://127.0.0.1:9000
    RootUser: alvian
    RootPass: minio123
    Console: http://192.168.2.100:9001 http://127.0.0.1:9001
    RootUser: alvian
    RootPass: minio123
    Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html
    $ mc alias set myminio http://10.0.2.100:9000 alvian minio123
    Documentation: https://min.io/docs/minio/linux/index.html
    Status: 1 Online, 0 Offline. API: http://192.168.2.100:9000 http://127.0.0.1:9000 RootUser: alvian RootPass: minio123 Console: http://192.168.2.100:9001 http://127.0.0.1:9001 RootUser: alvian RootPass: minio123 Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html $ mc alias set myminio http://10.0.2.100:9000 alvian minio123 Documentation: https://min.io/docs/minio/linux/index.html
    Status:         1 Online, 0 Offline.
    API: http://192.168.2.100:9000  http://127.0.0.1:9000
    RootUser: alvian
    RootPass: minio123
    Console: http://192.168.2.100:9001 http://127.0.0.1:9001
    RootUser: alvian
    RootPass: minio123
    
    Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html
       $ mc alias set myminio http://10.0.2.100:9000 alvian minio123
    
    Documentation: https://min.io/docs/minio/linux/index.html
  8. Silahkan akses minio melalui browser dengan link http://alamat-ip-server:9001 .– login menggunakan user dan password yang sebelumnya sudah diset.
  9. Silahkan create bucket dan selamat anda sudah berhasil menginstall Minio.

 

Demikian cara install MINIO Object Store di Ubuntu Server, silahkan tulis komentar jika ingin bertanya 🙂



Write A Comment

Light
Dark