A CentOS version was previously released; for this version, click the link below:
One-Click Installation of MinIO on Linux
Preparing the Installation Package<span>MinIO installation package address:</span><span>https://dl.min.io/server/minio/release/linux-amd64/minio</span>
The following script will automatically download and install the package. If the machine does not have internet access, please download the package from the link and comment out the download code in the script, then execute the installation directly.
For offline installation, pay attention to the installation of dependency packages.
Writing the Script Fileinstall_nginx.sh. Below is the content of the script file; please copy and save it as a script file.
#!/bin/bash# MinIO Installation Script (Customized)# ======= User Configuration ========MINIO_USER="admin"MINIO_PASSWORD="password"MINIO_PORT="9000"MINIO_CONSOLE_PORT="9001"MINIO_BASE_DIR="/www/server/minio"MINIO_DATA_DIR="$MINIO_BASE_DIR/data"MINIO_BIN="$MINIO_BASE_DIR/minio"MINIO_CONFIG_DIR="$MINIO_BASE_DIR/config"# ============================# Check if running as rootif [ "$(id -u)" -ne 0 ]; then echo "โ Please run this script as root (sudo -i)" exit 1fiecho "โ
Installing necessary dependencies..."apt update && apt install -y wget curl gnupg2 lsb-releaseecho "๐ Creating directories..."mkdir -p "$MINIO_DATA_DIR" "$MINIO_CONFIG_DIR"chmod 750 "$MINIO_DATA_DIR" "$MINIO_CONFIG_DIR"# Download MinIO and verifyecho "โฌ๏ธ Downloading MinIO..."wget --progress=bar:force https://dl.min.io/server/minio/release/linux-amd64/minio -O "$MINIO_BIN"echo "Granting execute permissions..."chmod +x "$MINIO_BIN"# Create MinIO userecho "๐ค Creating minio system user..."groupadd -r minio 2>/dev/nullid minio &>/dev/null || useradd -r -g minio minio# Set permissionschown -R minio:minio "$MINIO_BASE_DIR"# Create systemd serviceecho "๐ Creating systemd service file..."cat <<EOF > /etc/systemd/system/minio.service[Unit]Description=MinIO Object Storage ServerDocumentation=https://docs.min.ioWants=network-online.targetAfter=network-online.targetAssertFileIsExecutable=$MINIO_BIN[Service]User=minioGroup=minioEnvironment="MINIO_ROOT_USER=$MINIO_USER"Environment="MINIO_ROOT_PASSWORD=$MINIO_PASSWORD"Environment="MINIO_ADDRESS=:$MINIO_PORT"Environment="MINIO_CONSOLE_ADDRESS=:$MINIO_CONSOLE_PORT"ExecStart=$MINIO_BIN server "$MINIO_DATA_DIR" --config-dir "$MINIO_CONFIG_DIR"Restart=alwaysRestartSec=5LimitNOFILE=65536ProtectSystem=fullProtectHome=truePrivateTmp=trueNoNewPrivileges=true[Install]WantedBy=multi-user.targetEOF# Start the serviceecho "๐ Starting MinIO service..."systemctl daemon-reloadsystemctl enable miniosystemctl start minio# Check service statusecho "๐งช Checking MinIO running status..."if systemctl is-active --quiet minio; then echo "โ
MinIO started successfully!"else echo "โ MinIO failed to start, please execute journalctl -u minio -e to check the logs"fi# Output installation informationecho ""echo "============================================="echo "๐ MinIO installation completed"echo "๐ Installation directory: $MINIO_BASE_DIR"echo "๐ Data directory: $MINIO_DATA_DIR"echo "โ๏ธ Configuration directory: $MINIO_CONFIG_DIR"echo "๐ Data port: $MINIO_PORT"echo "๐ Console port: $MINIO_CONSOLE_PORT"echo "๐ค Admin account: $MINIO_USER"echo "๐ Admin password: $MINIO_PASSWORD"echo "๐ Console address: http://<your server IP>:$MINIO_CONSOLE_PORT"echo "============================================="
Note the paths and locations during installation; using this script requires some basic command reading skills.
For other one-click installation series, please refer to the following articles:
One-Click Installation of MySQL on Linux
One-Click Installation of Nginx on Linux
For skincare strategies, please refer to the following articles:
Skincare Ingredients Effect Comparison Table: Comprehensive Guide to Whitening/Anti-Aging/Moisturizing Ingredients
For travel strategies, please refer to the following articles:
Comprehensive Guide to Cost-Effective Travel Accommodations: Multi-Type Comparison to Help You Choose the Right Place to Stay
Essential Packing List and Packing Tips for Travel/Comprehensive Travel Packing Guide: Essential List + Efficient Tips Manual
If this content is helpful to you, please let me know, so I can understand your needs. Thank you for your attention.
Technical accumulation, meeting is fate
