11
14

More than 5 years have passed since last update.

AWS S3互換 minioをCentOS7にインストール

Posted at

minioのインストール

$ sudo curl https://dl.minio.io/server/minio/release/linux-amd64/minio -o /usr/local/bin/minio
$ sudo chmod +x /usr/local/bin/minio

minioクライアントのインストール

$ sudo curl https://dl.minio.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc
$ sudo chmod +x /usr/local/bin/mc

systemdスクリプトのインストール

$ sudo curl https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service -o /etc/systemd/system/minio.service
$ sudo useradd -s /sbin/nologin minio-user
/etc/default/minio
# Local export path.
MINIO_VOLUMES="/var/lib/minio/"

# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :9000"

# Access Key of the server.
MINIO_ACCESS_KEY={Server-Access-Key}

# Secret key of the server.
MINIO_SECRET_KEY={Server-Secret-Key}

Server-Access-Key, Server-Secret-Key は自分の設定で上書き可能。

$ sudo mkdir /var/lib/minio
$ sudo chown minio-user:minio-user /var/lib/minio

minioの有効化と起動

$ sudo systemctl enable minio
$ sudo systemctl start minio

minioクライアントの設定とテスト

# 設定
$ mc config host add minio http://127.0.0.1:9000 {Server-Access-Key} {Server-Secret-Key}

# バケットの作成
$ mc mb minio/test

# ファイルのコピー
$ mc cp ~/Downloads/test.png minio/test/

# ファイルのリスト
$ mc ls minio/test

# ファイルの削除
$ mc rm minio/test/test.png

Server-Access-Key, Server-Secret-Key は適宜書き換えてください。

HTTPS化などはリバースプロキシにnginxなりを設定してよしなに。

11
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
14