Hi guys, in this blog I'm going to explain to you how to set up an object storage server in your local system through MinIO object storage.
What is Object Storage -
Object storage is a computer data storage architecture that manages data as objects. It can directly store files, unlike block storage.
What is MinIO -
Minio is a popular open-source object storage server. The service stores unstructured data such as photos, videos, log files, backups, and container/VM images, and can even provide a single object storage server that pools multiple drives spread across many servers.
Prerequisites -
Ram - 2GB (testing), 4GB recommended.
HDD - As per your requirements.
Static IP address.
If you want to host it on the web then get a domain name.
Configuration -
First thing you need to update your server.
# sudo apt update -y
Now you need to download “minio” package by using the following command -
# wget https://dl.min.io/server/minio/release/linux-amd64/minio
After this you will get a file named as minio, now we need to grant execute permission to that file -
# sudo chmod +x minio
Now move this file into /usr/local/bin directory -
# sudo mv minio /usr/local/bin
Note:- minio is the main binary file which is responsible for all operations.
Now we need to add an user in nologin shell -
# sudo useradd -r minio-user -s /sbin/nologin
Now we need to set ownership of minio binary file -
# sudo chown minio-user:minio-user /usr/local/bin/minio
Next, we shall create a directory where Minio will store files. This will be the storage location for the buckets that we will use later to organize the objects you store on your Minio server. So I’m going to create a directory named as minio -
# sudo mkdir /usr/local/share/minio
Change ownership of that directory to minio-user -
# sudo chown minio-user:minio-user /usr/local/share/minio
Now create a directory under /etc for configuration file storage and change the ownership as well -
# sudo mkdir /etc/minio
#sudo chown minio-user:minio-user /etc/minio
Use vim text editor to create the environment file needed to modify the default configuration -
# sudo vim /etc/default/minio
Add the credentials information in this file -
MINIO_ACCESS_KEY="admin"
MINIO_VOLUMES="/usr/local/share/minio/"
MINIO_OPTS="-C /etc/minio --address your_server_ip:9000"
MINIO_SECRET_KEY="admin@123”
Save and exit
Now we need to download systemd service file using the following link -
# curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service
Now you can edit this file if you have any changes otherwise simply paste this file under /etc/systemd/system -
# sudo mv minio.service /etc/systemd/system
Now reload the systemd units -
# sudo systemctl daemon-reload
Now start and enable the service -
# sudo systemctl start/enable minio.enable
If you are running any firewall then make an entry for port 9000/tcp
Now you can access minio object storage through web browser -
https://server_ip:9000
Log in with your credentials which you have entered in /etc/default/minio
Now the configuration is done you can upload your data on the minio object storage.
Done
In the next blog, I’ll show you how to set up a three-node cluster in minio object storage
If you have any doubts then please comment below or you can mail me Johntheh4cker
Comments
i am getting that error it is not able to find that particular service i am doing it in my laptop
# systemctl enable minio.service
And if it's not working then check service file name under /etc/systemd/system.