VOOZH about

URL: https://thenewstack.io/add-object-storage-to-rocky-linux-with-minio/

⇱ Add Object Storage to Rocky Linux with MinIO - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-11-19 06:00:39
Add Object Storage to Rocky Linux with MinIO
tutorial,
Linux / Storage

Add Object Storage to Rocky Linux with MinIO

Nov 19th, 2022 6:00am by Jack Wallen
👁 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:

sudo curl -o /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio

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:

sudo chmod u+x /usr/local/bin/minio

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

echo $PATH

You should see something like this as the output:

-bash: /home/jack/.local/bin:/home/jack/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:

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

echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc

Reload bashrc with:

source ~/.bashrc

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

Verify the installation with:

minio --version

You should see something like this in the output:

minio version RELEASE.2022-11-11T03-44-20Z (commit-id=bdcb485740ee2cf320c9b331ebd354df5bf6d826)
Runtime: go1.19.3 linux/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2022 MinIO, Inc.

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:

sudo mkdir /data

Next, mount the drive with:

sudo mount /dev/sdb1 /data

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

sudo nano /etc/fstab

At the bottom of that file, add the following:

/dev/sdb1 /data ext4 defaults 0 0

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:

sudo mount -a

You should see no errors.

How to Configure MinIO

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

sudo useradd -r minio -s /sbin/nologin

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

sudo chown -R minio:minio /data

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

sudo mkdir /etc/minio

Give that directory the proper ownership with:

sudo chown -R minio:minio /etc/minio

Create a configuration file for MinIO with the command:

sudo nano /etc/default/minio

In that file, paste the following:

MINIO_ROOT_USER="minio"
MINIO_VOLUMES="/minio-data"
MINIO_OPTS="-C /etc/minio --address :9000 --console-address :9001"
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD="PWORD"

Where PWORD is a strong/unique password.

Save and close the file.

Give that file the proper permissions with:

sudo chown minio:minio /etc/default/minio

Create a systemd File for MinIO

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

sudo nano /lib/systemd/system/minio.service

In that file, paste the following:

[Unit]
Description=Minio
Documentation=https://docs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local/
User=minio
Group=minio

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

# Let systemd restart this service always
Restart=always

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Disable timeout logic and wait until the process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target
Save and close the file.

Reload the systemd daemon with:

sudo systemctl daemon-reload

Start and enable the MinIO service with:

sudo systemctl enable --now minio

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:

sudo firewall-cmd --zone=public --add-port=9000/tcp --permanent
sudo firewall-cmd --zone=public --add-port=9001/tcp --permanent

Reload the firewall with:

sudo firewall-cmd --reload

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.

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.

👁 Image

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.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
MinIO is a sponsor of The New Stack.
TNS owner Insight Partners is an investor in: Unit.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.