Neko Docs

MinIO

https://min.io/docs/minio/linux/index.html

Setup

references:

https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-single-node-single-drive.html#minio-snsd

下载 MinIO Server

wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20241218131544.0.0_amd64.deb -O minio.deb
dpkg -i minio.deb

更新权限

groupadd -r minio-user
useradd -M -r -g minio-user minio-user
chown minio-user:minio-user /mnt/data

/mnt/data 修改为minio文件存放地址

创建环境变量文件

Create an environment variable file at /etc/default/minio. The MinIO Server container can use this file as the source of all environment variables.

The following example provides a starting environment file:

# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment
 
MINIO_ROOT_USER=myminioadmin
MINIO_ROOT_PASSWORD=minio-secret-key-change-me
 
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
 
MINIO_VOLUMES="/mnt/data"
 
# MINIO_OPTS sets any additional commandline options to pass to the MinIO server.
# For example, `--console-address :9001` sets the MinIO Console listen port
MINIO_OPTS="--console-address :9001"

Include any other environment variables as required for your deployment.

Connect Your Browser to the MinIO Server

Open http://<ip>:9000 in a web browser to access the MinIO Console. You can alternatively enter any of the network addresses specified as part of the server command output. For example, Console: http://192.0.2.10:9001 http://127.0.0.1:9001 in the example output indicates two possible addresses to use for connecting to the Console.

While the port 9000 is used for connecting to the API, MinIO automatically redirects browser access to the MinIO Console.

Log in to the Console with the RootUser and RootPass user credentials displayed in the output. These default to minioadmin | minioadmin.

(Optional) Install the MinIO Client

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/mc

Use mc alias set to create a new alias associated to your local deployment. You can run mc commands against this alias:

mc alias set local http://127.0.0.1:9000 minioadmin minioadmin
mc admin info local

The mc alias set takes four arguments:

  • The name of the alias
  • The hostname or IP address and port of the MinIO server
  • The Access Key for a MinIO user
  • The Secret Key for a MinIO user

Creat a new bucket

Versioning, Object Locking, Retention 等需要在创建桶时就设置

例如可以设置全局(Governance)保留(Retention)180天后删除的策略

On this page