Minio is an open source object storage server that is compatible with Amazon S3 cloud storage service. It is one of the best S3-compatible object storages servers available in the market. In this tutorial, we will go through the steps to install Minio on POP! OS Latest.
Before we begin, please make sure you have the following prerequisites:
We can download Minio binaries from their official site. To download, use the following command:
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
After downloading, we need to make the binary executable by running the following command:
chmod +x minio
To run the Minio binary, we must create a user with restricted permissions. We will create a user named minio with the following command:
sudo useradd -s /sbin/nologin -M minio
We need to create a storage directory where Minio will store the data. Run the following command to create a directory named /minio-data/
sudo mkdir /minio-data/
In case you want your data directory outside of /, move it to wherever you prefer. Otherwise, your file owner won't be the same as the rest of the file.
sudo chown -R minio:minio /minio-data
We need to create a configuration file for Minio. You can create a configuration file with the following command:
sudo mkdir /etc/minio/
sudo mv ./minio /usr/local/bin/
sudo touch /etc/default/minio
sudo chmod +x /etc/default/minio
sudo nano /etc/default/minio
Add the following contents into the configuration file /etc/default/minio/
#!/usr/bin/env bash
# -------------------------------------------------------------------
# File Name : minio_service.sh
# Author : minio,minio@minio.io
# Purpose : systemd service file for minio
# Created : 1 July 2016
# -------------------------------------------------------------------
# Change these to match your desired configuration
MINIO_VOLUMES="/minio-data"
MINIO_OPTS="-C /etc/minio --quiet"
# -------------------------------------------------------------------
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting Minio"
sudo -u minio /usr/local/bin/minio server $MINIO_VOLUMES $MINIO_OPTS &
;;
stop)
echo "Stopping Minio"
killall minio
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
Save and exit the file.
We can now create a systemd service to manage Minio. We can run the following command:
sudo nano /etc/systemd/system/minio.service
Add the following contents into the file:
[Unit]
Description=MinIO
Documentation=https://docs.min.io/docs/minio
Wants=network-online.target
After=network-online.target
[Service]
User=minio
Group=minio
EnvironmentFile=/etc/default/minio
WorkingDirectory=/usr/local/bin/
ExecStart=/etc/default/minio start
ExecStop=/etc/default/minio stop
Restart=on-failure
Type=simple
[Install]
WantedBy=multi-user.target
Save and exit the file.
We can now start the Minio service.
First, reload the systemd manager configuration:
sudo systemctl daemon-reload
Then, enable the Minio service:
sudo systemctl enable minio.service
Finally, start the Minio service:
sudo systemctl start minio.service
Minio should now be up and running on your server.
In this tutorial, we have covered how to install and configure Minio on POP! OS Latest. We hope this has been helpful to you.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!