Windows system >> Windowsの知識 >  >> Windowsチュートリアル合成 >> システムFAQ >> Nginx-gridfsのインストール

Nginx-gridfsのインストール

  

mongodb gridfsはビデオや高精細画像やその他の大きなファイルを保存するのに適しています(小さなファイルはmongodbには存在しないようにすることをお勧めします)。 Mp4ファイル:

1:nginx-gridfsのインストール

gitクローンhttps://github.com/rjhunjhunwla/nginx-gridfs //git:yum -yのインストールgit cdが存在しない場合Nginx-gridfs /gitサブモジュールinit gitサブモジュールの更新

2 :: install nginx

./configure --prefix = /opt /nginx --add-module = /opt /software /nginx -gridfs make make install

3:nginx-gridfsの設定:(参照:https://github.com/rjhunjhunwla/nginx-gridfs関連のパラメータ設定)

nginx.confファイル内参加する:

location /video {gridfs dbname root_collection = fsフィールド= filenameタイプ= string user = username pass = passwd; mongo 127.0.0.1:27017;}

4:html call表示:(http://www.videojs.com/video.jsを使用してダウンロード)

< videoクラス=" video-js vjs- default-skin "コントロールwidth =" 640 "height =" 264 "preload =" auto ">< source src =" http://127.0.0.1/video/filename.mp4" type = 'video /mp4 '/>< /video>

Copyright © Windowsの知識 All Rights Reserved