Minio is an object storage server released under Apache License v2.0. It is compatible with Amazon S3 cloud storage service. It is best suited for storing unstructured data such as photos, videos, log files, backups and container / VM images. The size of an object can range from a few KBs to a maximum of 5TB.
Minio server is light enough to be bundled with the application stack, similar to NodeJS, Redis, and MySQL.
Pre-requisite of minio
- Ubuntu 16.04 installed
- wget should installed to download minio binary
Read Also: How to install minio on centos?
Download Minio binary
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
Permissions
Now we will give execute permission to minio to execute it.
chmod +x minio
Start minio Server
Just execute the following command to start minio, we need to give the directory for minio
./minio server /mnt/minio
When you run minio you will get a key and a secret. These are used to access the client and the browser.
Endpoint: http://10.144.0.241:9000 http://10.120.0.62:9000 http://127.0.0.1:9000 http://192.168.56.1:9000
AccessKey: OVWL8SROQ7V69665YHPS
SecretKey: z0RDSSliGY+prqVnEJMitj2chn+TLn1W9jI2ayGw
Region: us-east-1
SQS ARNs: <none>
Browser Access:
http://10.144.0.241:9000 http://10.120.0.62:9000 http://127.0.0.1:9000 http://192.168.56.1:9000
Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
$ mc config host add myminio http://10.144.0.241:9000 OVWL8SROQ7V69665YHPS z0RDSSliGY+prqVnEJMitj2chn+TLn1W9jI2ayGw
Object API (Amazon S3 compatible):
Go: https://docs.minio.io/docs/golang-client-quickstart-guide
Java: https://docs.minio.io/docs/java-client-quickstart-guide
Python: https://docs.minio.io/docs/python-client-quickstart-guide
JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide
Drive Capacity: 17 GiB Free, 222 GiB Total
Install Minio client
Minio Client (mc) provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. It supports filesystems and Amazon S3 compatible cloud storage service (AWS Signature v2 and v4).
wget https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc help
Configure minio client
We will configure minio instance with mc client
./mc config host add minio http://127.0.0.1:9000 accessCode secretCode
Create bucket
If you want to upload some data or files you need to create a bucket. We will use mb
to create the bucket.
./mc mb minio/photos
List the files
We can use mc command to list the files in the bucket
./mc ls minio/photos
Currently, there is nothing in photos directory let’s upload some file in it.
# ./mc cp ubuntu.jpg minio/photos/
~/Downloads/ubuntu.png: 94.42 KB / 94.42 KB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.00% 20.57 MB/s 0s
Check the files in bucket
./mc ls minio/photos/
[2017-07-13 13:17:17 UTC] 12KiB ubuntu.jpg
Check out files in browser
Open the following URL to access minio browser
http://ipaddress:9000
You need to provide the AccessKey and SecretKey in order to access the minio browser
You can create and access buckets from minio browser also.
If you have any issues using this tutorial please feel free to comment below..
Read Also:
How to install postgresql on centos 7?
AWS CLI – Useful S3 commands
Leave a Reply