借鉴(https://blog.csdn.net/qq_34301871/article/details/80060235)
1、unknown directive "ngx_fastdfs_module" ngix整合fastdfs启动后报错
执行yum groupinstall'Development Tools'
后重新执行 进入 fastdfs-nginx-module 目录后执行make,makeInstall后重启,发现nginx日志没错了
yum groupinstall 'Development Tools' 出现错误(https://blog.csdn.net/wongnoubo/article/details/80445155)
2、编译nginx报错(https://blog.csdn.net/xinlus/article/details/82185137)
编辑:fastdfs-nginx-module-1.20/src/config 文件
vim fastdfs-nginx-module-1.20/src/config ngx_addon_name=ngx_http_fastdfs_module if test -n "${ngx_module_link}"; then ngx_module_type=HTTP ngx_module_name=$ngx_addon_name ngx_module_incs="/usr/include/fastdfs /usr/include/fastcommon/" ngx_module_libs="-lfastcommon -lfdfsclient" ngx_module_srcs="$ngx_addon_dir/ngx_http_fastdfs_module.c" ngx_module_deps= CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='2561024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"'" . auto/module else HTTP_MODULES="$HTTP_MODULES ngx_http_fastdfs_module" NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fastdfs_module.c" CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/" CORE_LIBS="$CORE_LIBS -lfastcommon -lfdfsclient" CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='2561024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"'"
#其中两段修改 ngx_module_incs="/usr/include/fastdfs /usr/include/fastcommon/" CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"
再重新到nginx目录下
.configure …..
make编译
编译安装完成后查看nginx版本 /usr/local/nginx/sbin/nginx -V
有以下内容说明模块添加成功