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:
- Download minio terbaru dengan command:
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230809233022.0.0_amd64.deb -O minio.debwget 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
- Install minio:
sudo dpkg -i minio.debsudo dpkg -i minio.deb
sudo dpkg -i minio.deb
- Buat file systemd untuk menjalankan service minio:nano /usr/lib/systemd/system/minio.service
nano /usr/lib/systemd/system/minio.service
[Unit]Description=MinIODocumentation=https://min.io/docs/minio/linux/index.htmlWants=network-online.targetAfter=network-online.targetAssertFileIsExecutable=/usr/local/bin/minio[Service]WorkingDirectory=/usr/localUser=minio-userGroup=minio-userProtectProc=invisibleEnvironmentFile=-/etc/default/minioExecStartPre=/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 alwaysRestart=always# Specifies the maximum file descriptor number that can be opened by this processLimitNOFILE=65536# Specifies the maximum number of threads this process can createTasksMax=infinity# Disable timeout logic and wait until process is stoppedTimeoutStopSec=infinitySendSIGKILL=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.
- Buat user dan group dengan nama minio-user:
groupadd -r minio-useruseradd -M -r -g minio-user minio-usercd /mkdir -p mnt/{data,disk1,disk2,disk3,disk4}chown minio-user:minio-user /mnt/data /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4groupadd -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
- 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
#set object storage path folderMINIO_VOLUMES="/mnt/data"#ganti port 9001 dengan port lain yang belum digunakanMINIO_OPTS="--certs-dir /home/minio-user/.minio/certs/ --console-address :9001"#set user loginMINIO_ROOT_USER=alvian#set password loginMINIO_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.
- Jalankan service minio: sudo systemctl start minio.service
sudo systemctl start minio.service
- Cek status: sudo systemctl status minio.service
sudo systemctl status minio.service
Status: 1 Online, 0 Offline.API: http://192.168.2.100:9000 http://127.0.0.1:9000RootUser: alvianRootPass: minio123Console: http://192.168.2.100:9001 http://127.0.0.1:9001RootUser: alvianRootPass: minio123Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html$ mc alias set myminio http://10.0.2.100:9000 alvian minio123Documentation: https://min.io/docs/minio/linux/index.htmlStatus: 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.htmlStatus: 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
- Silahkan akses minio melalui browser dengan link http://alamat-ip-server:9001 .
– login menggunakan user dan password yang sebelumnya sudah diset.
- 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