Installing Minio on POP! OS Latest
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.
Prerequisites
Before we begin, please make sure you have the following prerequisites:
- A server running POP! OS Latest
- A non-root user with sudo privileges
Step 1: Download Minio Binary
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
Step 2: Make Minio Executable
After downloading, we need to make the binary executable by running the following command:
chmod +x minio
Step 3: Create Minio User
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
Step 4: Create Storage Directory
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
Step 5: Configure Minio
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,[email protected]
# 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.
Step 6: Create Systemd Service
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.
Step 7: Start Minio Service
We can now start the Minio service.
First, reload the systemd manager configuration:
sudo systemctl daemon-reloadThen, enable the Minio service:
sudo systemctl enable minio.serviceFinally, start the Minio service:
sudo systemctl start minio.service
Minio should now be up and running on your server.
Conclusion
In this tutorial, we have covered how to install and configure Minio on POP! OS Latest. We hope this has been helpful to you.