天天看點

記一次 Centos7 安裝 Minio (檔案伺服器)

一、基本資訊

官網  https://min.io/

下載下傳  https://min.io/download#/linux

文檔  https://docs.min.io/

二、環境、工具說明

1、作業系統  Centos7.4 x64  Minimal 1708    

記憶體 2G

CPU 1核

2、工具:xshell5

3、VMware 版本:VMware Workstation Pro15

三、安裝部署

1、虛拟機安裝

參考 https://hunter.blog.csdn.net/article/details/89328381

2、安裝基本工具

[[email protected] ~]# yum install -y wget vim
           

3、建立目錄

[[email protected] ~]# mkdir /opt/minio
[[email protected] ~]# mkdir /opt/minio/data
           

4、進入目錄

[[email protected] ~]# cd /opt/minio
           

5、下載下傳

[[email protected] ~]# wget https://dl.min.io/server/minio/release/linux-amd64/minio
           

6、賦權

[[email protected] ~]# chmod +x minio
           

7、防火牆開啟 9000 端口

[[email protected] ~]# firewall-cmd --zone=public --add-port=9000/tcp --permanent
           

重新開機防火牆

[[email protected] ~]# systemctl restart firewalld
           

或者直接關閉防火牆 (安全條件允許的情況下)

8、啟動服務

(1)控制台啟動  

[[email protected] ~]# /opt/minio/minio server /opt/minio/data/
           

擴充:

此處如果結合 httpd 搭建檔案伺服器,會有另一番體驗

httpd環境搭建參考

https://hunter.blog.csdn.net/article/details/93907895

搭建完成之後,把 minio 服務啟動的 data 目錄改為 httpd 的指定目錄即可

(2)背景守護啟動

[[email protected] ~]# nohup  /opt/minio/minio server /opt/minio/data/  &
           

(3)自定義端口

[[email protected] ~]# nohup  /opt/minio/minio server 節點ip:指定端口 /opt/minio/data/  &
           

控制台啟動詳情如下:

記一次 Centos7 安裝 Minio (檔案伺服器)

詳細資訊如下:

AccessKey 和  SecretKey  是下一步浏覽器登入的賬号和密碼

Endpoint:  http://192.168.11.20:9000  http://127.0.0.1:9000      
AccessKey: 4S12N3TBBCCOFRI73HMC 
SecretKey: GBhI1fLXcWWgbbGVB7ZI63nmFuysYBNVF+OsgQJg 
Browser Access:
   http://192.168.11.20:9000  http://127.0.0.1:9000      
Command-line Access: https://docs.min.io/docs/minio-client-quickstart-guide
   $ mc config host add myminio http://192.168.11.20:9000 4S12N3TBBCCOFRI73HMC GBhI1fLXcWWgbbGVB7ZI63nmFuysYBNVF+OsgQJg
Object API (Amazon S3 compatible):
   Go:         https://docs.min.io/docs/golang-client-quickstart-guide
   Java:       https://docs.min.io/docs/java-client-quickstart-guide
   Python:     https://docs.min.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
   .NET:       https://docs.min.io/docs/dotnet-client-quickstart-guide
           

9、浏覽器檢視

浏覽器錄入位址:        http://(節點ip):9000

記一次 Centos7 安裝 Minio (檔案伺服器)

錄入賬号和密碼

記一次 Centos7 安裝 Minio (檔案伺服器)

10、建立存儲桶

記一次 Centos7 安裝 Minio (檔案伺服器)

建立成功的存儲桶

記一次 Centos7 安裝 Minio (檔案伺服器)

11、在指定的存儲桶中上傳檔案

記一次 Centos7 安裝 Minio (檔案伺服器)

上傳的檔案清單

記一次 Centos7 安裝 Minio (檔案伺服器)

12、檢視檔案連結

記一次 Centos7 安裝 Minio (檔案伺服器)

把連結放入浏覽器位址欄,可直接檢視詳情

13、在控制台檢視已上傳的檔案清單

[[email protected] ~]# ll /opt/minio/data/test/
           
記一次 Centos7 安裝 Minio (檔案伺服器)

14、下載下傳、安裝用戶端

(1)進入目錄

[[email protected] ~]#  /opt/minio/
           

(2)下載下傳用戶端

[[email protected] minio]# wget https://dl.min.io/client/mc/release/linux-amd64/mc
           

(3)賦權

[[email protected] minio]# chmod +x mc
           

(4)檢視說明

[[email protected] minio]# ./mc --help
           
NAME:
  mc - MinIO Client for cloud storage and filesystems.
USAGE:
  mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
COMMANDS:
  ls       list buckets and objects
  mb       make a bucket
  rb       remove a bucket
  cp       copy objects
  mirror   synchronize object(s) to a remote site
  cat      display object contents
  head     display first 'n' lines of an object
  pipe     stream STDIN to an object
  share    generate URL for temporary access to an object
  find     search for objects
  sql      run sql queries on objects
  stat     show object metadata
  tree     list buckets and objects in a tree format
  du       summarize disk usage folder prefixes recursively
  diff     list differences in object name, size, and date between two buckets
  rm       remove objects
  event    configure object notifications
  watch    listen for object notification events
  policy   manage anonymous access to buckets and objects
  admin    manage MinIO servers
  session  resume interrupted operations
  config   configure MinIO client
  update   update mc to latest release
  version  show version info
GLOBAL FLAGS:
  --autocompletion              install auto-completion for your shell
  --config-dir value, -C value  path to configuration folder (default: "/root/.mc")
  --quiet, -q                   disable progress bar display
  --no-color                    disable color theme
  --json                        enable JSON formatted output
  --debug                       enable debug output
  --insecure                    disable SSL certificate verification
  --help, -h                    show help
  --version, -v                 print the version
TIP:
  Use 'mc --autocompletion' to enable shell autocompletion
VERSION:
  RELEASE.2019-08-14T20-49-49Z
           

(5)檢視目錄

[[email protected] minio]# ./mc ls
           
記一次 Centos7 安裝 Minio (檔案伺服器)

15、擴充  多種程式設計語言的 API 文檔

Object API (Amazon S3 compatible):
   Go:         https://docs.min.io/docs/golang-client-quickstart-guide
   Java:       https://docs.min.io/docs/java-client-quickstart-guide
   Python:     https://docs.min.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
   .NET:       https://docs.min.io/docs/dotnet-client-quickstart-guide
           

至此,Centos7  安裝  Minio  (檔案伺服器)操作完畢!希望對您能有所幫助!