Skip to main content

Object storage configuration through MinIO

Object storage configuration through MinIO
 

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

Unknown said…
Failed to enable unit: Unit file minio.enable.service does not exist.


i am getting that error it is not able to find that particular service i am doing it in my laptop
JohnTheH4cker said…
As I can see you are using the wrong name, please try with the following command -
# systemctl enable minio.service

And if it's not working then check service file name under /etc/systemd/system.

Popular posts from this blog

How to install BlackArch Linux in VirtualBox

In this blog, I'm going to show you how to install BlackArch Linux in VirtualBox/VMWare. Open your VirtualBox application and click on create a new virtual machine from the main menu. Assign a minimum 2GB ram minimum. Add hard-disk of at least 50GB. Now boot the newly created VM and start the installation process. First, select Boot Black arch Linux, and if you have Nvidia graphics then select Boot BlackArch Linux (nonfree). First thing first you need to login in your new BlackArch live session. The default username and password is root & blackarch. Now after this open terminal and type first command #blackarch-install- #blackarch-install After that, you need to follow the instructions. - Select the second option Install from black arch Live-ISO and hit enter.   - Now you need to select the output method quiet or verbose, here I'm selecting the second option verbose mode.  - Now select your locale settings, according to your locality, here I

How to install and setup Manjaro-i3 for the first time.

Hey, guys today I'm going to show you how to install and setup Manjaro-i3. In this case, first of all, we need to know what is Manjaro and the difference between Manjaro & Manjaro-i3. What is Manjaro? Manjaro is an opensource Linux distribution based on ArchLinux. Its basically used for personal work or we can say that this distribution is the workstation edition of ArchLinux. What is i3? i3 is a desktop environment used in many distributions. It looks good and clean. If you are good at remembering shortcuts and commands then this is for you. It's a lightweight desktop environment. If you are switching to i3 from a gnome desktop environment then you will find some dificulties to use it, but you will learn very quickly. In my opinion, this is the most beautiful desktop environment I have ever used. Now let's take a look at how to install it in VirtualBox . First of all, create a virtual machine with at least 2 GB ram and 40 GB HDD space. Now a