+
Skip to content

rmoorman/minio

 
 

Repository files navigation

Minio Quickstart Guide

Slack Go Report Card Docker Pulls codecov

Minio is an object storage server, released under Apache License v2.0, that is compatible with the Amazon S3 cloud storage service. Minio is best suited for storing unstructured data such as photos, videos, log files, backups, and container / VM images. The size of an object can range from a few kilobytes to a maximum of 5TB. Minio Server is light enough to be bundled with an application stack similar to NodeJS, Redis, and MySQL. Minio also provides a client that communicates with the server to store and retrieve objects.

This quickstart guide describes how to quickly install and run Minio Server locally. These are the steps you will follow:

  1. Open a Firewall Port
  2. Install and run the Minio Server
  3. Test Using the Minio Web-based Object Browser
  4. Identify the Endpoint, Access Key, and Secret Key
  5. Test using Minio Client

1. Open a Firewall Port

By default, Minio uses port 9000 to listen for incoming connections. If your platform blocks the port by default, you may need to enable access to the port. Use one of the following methods to allow port access:

iptables

For hosts with iptables enabled (RHEL, CentOS, etc), use iptables to enable all traffic coming into specific ports. The following command allows access to port 9000:

iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
service iptables restart

The following command enables all incoming traffic to ports 9000 through 9010:

iptables -A INPUT -p tcp --dport 9000:9010 -j ACCEPT
service iptables restart

ufw

For hosts with ufw enabled (Debian-based distributions), use ufw to allow traffic on specific ports. The following command allows access to port 9000:

ufw allow 9000

The following command enables all incoming traffic to ports 9000 through 9010:

ufw allow 9000:9010/tcp

firewall-cmd

For hosts with firewall-cmd enabled (CentOS), use firewall-cmd to allow traffic to specific ports. The following command sequence allows access to port 9000.

This command gets the active zones:

firewall-cmd --get-active-zones

Apply port rules to the relevant zones returned by the previous command. For example, if the zone is public, use the following command:

firewall-cmd --zone=public --add-port=9000/tcp --permanent

Note: --permanent ensures the rules are persistent across a start, restart, or reload of the firewall.

Specify --reload with firewall-cmd for the changes to take effect:

firewall-cmd --reload

2. Install and run the Minio Server

Use one of the following methods to install and run Minio Server locally:

Docker Container

Stable

Install the server:

docker pull minio/minio

Run the server on port 9000 and store data in a local folder named /data:

docker run -p 9000:9000 minio/minio server /data

Edge

Install the server:

docker pull minio/minio:edge

Run the server on port 9000 and store data in a local folder named /data:

docker run -p 9000:9000 minio/minio:edge server /data

Note: Docker will not display the autogenerated keys unless you start the container with the -it(interactive TTY) argument. Generally, it is not recommended that you use autogenerated keys with containers. See the Minio Docker Quickstart Guide for more information.

macOS

Homebrew

Install the Minio server package using Homebrew:

brew install minio/stable/minio

Run the server on port 9000 and store data in a local folder named /data:

minio server /data

Note: If you previously installed minio using brew install minio, it is recommended that you reinstall minio from the official minio/stable/minio repository instead.

brew uninstall minio
brew install minio/stable/minio

Binary Download

Platform URL
Apple macOS https://dl.minio.io/server/minio/release/darwin-amd64/minio

Allow all users to read and execute minio:

chmod 755 minio

Run the server on port 9000 and store data in a local folder named /data:

./minio server /data

GNU/Linux

Binary Download

Platform URL
GNU/Linux https://dl.minio.io/server/minio/release/linux-amd64/minio

Download the binary and make it into an executable:

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

Run the server on port 9000 and store data in a local folder named /data:

./minio server /data

Microsoft Windows

Binary Download

Platform URL
Microsoft Windows https://dl.minio.io/server/minio/release/windows-amd64/minio.exe

Run the server on port 9000 and store data in a local folder on the D:\Photos:

minio.exe server D:\Photos

FreeBSD

Port

Install Minio packages using pkg:

pkg install minio

Configure Minio variables to enable Minio and store data in a local folder named /home/user/Photos:

sysrc minio_enable=yes
sysrc minio_disks=/home/user/Photos

Run the server on the default port (9000):

service minio start

GitHub

Installing Minio from the source repository on GitHub is only intended for developers and advanced users. If you do not have a working Golang environment, see How to install Golang.

Install Minio Server using Golang:

go get -u github.com/minio/minio

3. Test Using the Minio Web-based Object Browser

If Minio Server has started successfully, it will display an embedded web-based object browser. Navigate your web browser to http://127.0.0.1:9000 and ensure that the following screen is displayed:

Screenshot

4. Identify the Endpoint, Access Key, and Secret Key

Once the server is running you should see a response similar to this one:

Endpoint:  http://192.168.0.15:9000  http://127.0.0.1:9000
AccessKey: 6BRHR38FJ1TWH54QGKO2
SecretKey: 1PiWZf9hJVpjZkbhnfdDdE7SFAem__v0DghNJNdk

Browser Access:
   http://192.168.0.15:9000  http://127.0.0.1:9000

Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
   $ mc config host add myminio http://192.168.0.15:9000 6BRHR38FJ1TWH54QGKO2 1PiWZf9hJVpjZkbhnfdDdE7SFAem__v0DghNJNdk
...

From the output, identify the endpoint, access key, secret key, browser URLs and ports, and the client command necessary to add the server to the list of hosts accessible by the client. This information will be used when testing with Minio Client.

5. Test Using Minio Client

Minio Client is a command-line tool called mc that provides UNIX-like commands for interacting with the server (e.g. ls, cat, cp, mirror, diff, find, etc.). mc supports file systems and Amazon S3-compatible cloud storage services (AWS Signature v2 and v4).

Test mc with the server using the instructions in the Minio Client Quickstart Guide

Explore Further

Contribute to the Minio Project

Follow the instructions in the Minio Contributor's Guide.

License

FOSSA Status

About

Minio is an open source object storage server compatible with Amazon S3 APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.7%
  • JavaScript 5.4%
  • CSS 1.0%
  • Shell 0.8%
  • Makefile 0.1%
  • HTML 0.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载