Installation and use of nginx-gridfs module

WBOY
Release: 2016-08-08 09:28:18
Original
1279 people have browsed it

Reference article: http://www.open-open.com/lib/view/open1330171884015.html

Installation and use of nginx-gridfs moduleProject homepage: https://github.com/mdirolf/nginx-gridfs Through nginx-gridfs, you can directly use http to access files in GridFS. 1. InstallInstall various dependency packages: zlib, pcre, openssl Under ubuntu the following command may be: sudo apt-get install zlib1g- dev                 //It seems that sudo apt-get install zlib-dev cannot be installedsudo apt-get install libpcre3 libpcre3-devsudo apt-get install openssl libssl-devinstallgit (omitted) Use git to download the code of nginx-gridfs: git clone git://github.com/mdirolf/nginx-gridfs.git cd nginx-gridfs git submodule init git submodule update Downloadnginx: wget http://nginx.org/download/nginx-1.0.12.ziptar zxvf nginx-1.0.12.zipcd nginx-1.0.12. /configure --add-module=>makesudo make installIf there is a compilation error, add --with-cc when configure -opt=-Wno-error parameter. 2. Configure nginxAdd the following location /pics/ to the configuration of server field=filename type=string;. Mongo 127.0.0.1:27017 ;} The configuration above is expressed: database is Pics, to visit the file through file name filename, Filename The type is String Currently only supports accessing files through id and filename. Start nginx: /usr/local/nginx/sbin/nginxUse MongoVUE to upload a picture 001.jpg to pics In the database. Open: http://localhost/pics/001.jpgIf successful, you can see the displayed picture. 3. The shortcomings of nginx-gridfs does not implement the range support of http, which is the function of resuming downloads at breakpoints and downloading in pieces. The above introduces the installation and use of the nginx-gridfs module, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!