Modal Title
Linux / Storage

Add Object Storage to Rocky Linux with MinIO

Nov 19th, 2022 6:00am by
Featued image for: Add Object Storage to Rocky Linux with MinIO

EDITOR’S NOTE: MinIO is a sponsor of The New Stack.

Object storage makes it possible to store massive amounts of unstructured data that is written once and read many times. Object storage is used for housing videos and photos, music, and files for online collaboration. In object storage, data is sectioned off into units (aka “objects”) where it is stored in a flat environment. Each object includes:

  • Data
  • Metadata
  • Unique identifier

All data blocks for a file are contained together as an object and are stored in what is called a storage pool. To access data, the storage system uses a unique identifier and metadata to find the object. Data can be accessed using RESTful APIs, HTTP, and HTTPS.

Object storage is crucial to the functioning of cloud services and applications. And because of the way object storage works, you can scale very quickly, up to petabytes and exabytes (so long as the machine in question has the space).

There’s a handy open source platform that can serve your object storage needs. That project is called MinIO and was written in Go and is compatible with Amazon S3 object storage. Even better, you can install MinIO on your machines. I’m going to walk you through the process of getting MinIO installed on Rocky Linux. You can do this with Rocky Linux installed on your hardware in your data center (or developer network) or you can take this process to the cloud and your favorite cloud host. Either way you go, the process isn’t terribly difficult.

And, with that said, let’s get to said process.

What You’ll Need

To successfully pull this off, you’ll need the following:

  • A running instance of Rocky Linux. I’ll be demonstrating on Rocky Linux 9.
  • A user with sudo privileges.
  • Enough space on your drive to house the storage (more on that in a bit).

That’s it. Time to work.

How to Install MinIO

The first thing we’ll do is install MinIO. Log in to your Rocky Linux instance and download the binary with the command:


That command will download the minio executable file and save it into /usr/local/bin. You will then need to give the file executable permissions with:


Make sure /usr/local/bin is in your user’s PATH with the command:


You should see something like this as the output:


If you don’t find /usr/local/bin in your PATH, you can add it with:


Reload bashrc with:


Now, when you check your PATH, you should see /usr/local/bin listed.

Verify the installation with:


You should see something like this in the output:


Awesome. Let’s keep going.

How to Set up a Drive for MinIO Object Storage

If your local storage isn’t large enough to house all of the data, you’ll need to attach an external drive and mount it. Let’s say you have a drive named /dev/sdb1 and you want to mount it to /data.

First, created the /data directory with:


Next, mount the drive with:


For our next trick, we’ll add an entry to fstab so the drive is always mounted, even after a reboot. Open fstab with:


At the bottom of that file, add the following:


Do note that if your drive uses another partition format, make sure to replace ext4 with the proper type.

Save and close the file.  Remount all available partitions with:


You should see no errors.

How to Configure MinIO

First, we must add a specific user with the command:


Change the ownership of the data file so that it belongs to the minio user with:


Now, make a directory to house the MinIO configurations with:


Give that directory the proper ownership with:


Create a configuration file for MinIO with the command:


In that file, paste the following:


Where PWORD is a strong/unique password.

Save and close the file.

Give that file the proper permissions with:

Create a systemd File for MinIO

We now must create a systemd file for MinIO. Do that with the command:


In that file, paste the following:


Reload the systemd daemon with:


Start and enable the MinIO service with:

Open the Firewall

Without the firewall open, we can’t access MinIO, which requires both 9000 and 9001 TCP ports open. Do this with the commands:


Reload the firewall with:

How to Access MinIO

Open a web browser on the same network and point it to http://SERVER:9000 (where SERVER is the IP address or domain of the hosting server). You should be greeted by the login screen (Figure 1), where you’ll authenticate with username “admin” and the password you created in the configuration file.

Figure 1: Authenticate with Minio.

Once you successfully authenticate, you’ll find yourself on the main MinIO window (Figure 2), where you can create your first storage bucket and manage things like access keys, identities, monitoring, notification, tiers, replication, and more.

Figure 2: The main MinIO window is ready to use.

And that’s all there is to create object storage on Rocky Linux. Enjoy that newfound ability to store your unstructured data.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Unit.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.