1 Star 0 Fork 15

jarod_lmn/fastdfs-nginx-module

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
INSTALL 2.52 KB
一键复制 编辑 原始数据 按行查看 历史
happyfish100 提交于 2019-11-29 08:37 . INSTALL file refined
Copy right 2010 Happy Fish / YuQing
This software may be copied only under the terms of the GNU General
Public License V3, Please visit the FastDFS Home Page for more detail.
Chinese language: http://www.fastken.com/
#step 1. first install the FastDFS storage server and client library,
the FastDFS version should >= 6.03. download with git:
github address: https://github.com/happyfish100/fastdfs
gitee address: https://gitee.com/fastdfs100/fastdfs.git
command lines as:
git clone https://github.com/happyfish100/fastdfs
cd fastdfs; git checkout V6.03
./make.sh clean && ./make.sh && ./make.sh install
#step 2. download nginx server source code from http://nginx.org/
FastDFS nginx module test passed with nginx 1.16.1,
my nginx installed in /usr/local/nginx
#step 3. download FastDFS nginx module source code,
github address: https://github.com/happyfish100/fastdfs-nginx-module
gitee address: https://gitee.com/fastdfs100/fastdfs-nginx-module.git
command lines as (YOUR_PATH is your base path eg. /home/yuqing ):
cd $YOUR_PATH
git clone https://github.com/happyfish100/fastdfs-nginx-module
cd fastdfs-nginx-module; git checkout V1.22
#step 4. enter the nginx source dir, compile and install fastdfs module, such as:
cd nginx-1.16.1
./configure --add-module=$YOUR_PATH/fastdfs-nginx-module/src
make; make install
Notice:
* replace $YOUR_PATH with your fastdfs-nginx-module base path, such as /home/yuqing
* before compile, you can change FDFS_OUTPUT_CHUNK_SIZE and
FDFS_MOD_CONF_FILENAME macro in the config file as:
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/etc/fdfs/mod_fastdfs.conf\"'"
#step 5. config the nginx config file such as nginx.conf, add the following lines:
location /M00 {
root /home/yuqing/fastdfs/data;
ngx_fastdfs_module;
}
#step 6. make a symbol link ${fastdfs_base_path}/data/M00 to ${fastdfs_base_path}/data,
command line such as:
ln -s /home/yuqing/fastdfs/data /home/yuqing/fastdfs/data/M00
#step 7. copy conf/http.conf and conf/mime.types in FastDFS source path to /etc/fdfs/ and modify http.conf, such as:
cd /home/yuqing/fastdfs
cp conf/http.conf conf/mime.types /etc/fdfs/
#step 8. copy mod_fastdfs.conf to /etc/fdfs/ and modify it
#step 9. restart the nginx server, such as:
/usr/local/nginx/sbin/nginx -s stop; /usr/local/nginx/sbin/nginx
#step 10. view nginx log file, such as:
tail -n 100 /usr/local/logs/error.log
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jarod_lmn/fastdfs-nginx-module.git
git@gitee.com:jarod_lmn/fastdfs-nginx-module.git
jarod_lmn
fastdfs-nginx-module
fastdfs-nginx-module
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385