minio server

/

minio serverの使い方

タグ


概要

  • S3互換のバケットの管理システムでオンプレで動作させられるソフトウェア
  • /mountainduck/を利用することでファイルシステムとしてマウントでき、プライベートクラウドとして運用が可能である
  • 専用のmcというクライアントソフトウェアも提供している
  • S3にデータを保存できるlitestreamのバックエンドとしても使用可能

install

goコマンドを用いる

$ go install github.com/minio/minio@latest

バイナリを直接ダウンロードする

$ wget https://dl.min.io/server/minio/release/linux-amd64/minio
$ chmod +x minio

config

  • ~/.minio/config.jsonを作成し、そこに記述する
{
    "version": "1",
    "credential": {
        "accessKey": "<username>",
        "secretKey": "<password>"
    },
    "region": "us-east-1",
    "browser": "on"
}

serverの起動

$ minio server <target-directory>/ --address ":9000" --console-address ":9001"

サービスの作成

~/.config/systemd/user/minio.service

[Unit]
Description=MinIO Server
After=network.target

[Service]
ExecStart=minio server %h/minio
WorkingDirectory=%h
Environment="MINIO_CONFIG_DIR=%h/.minio"
Restart=always

[Install]
WantedBy=default.target

参考