网络云盘项目-nginx添加fastdfs-模块

栏目: 服务器 · 发布时间: 6年前

内容简介:make修改 obj/makefile,添加找到的路径
  • 解压 fastdfs-nginx-module-1.20
  • 进入Nginx安装目录
  • 重新配置安装包,添加fastdfs源码目录
sudo ./configure --add-module=/root/libinstall/fastdfs-nginx-module-1.20/src

make

  • 报错

网络云盘项目-nginx添加fastdfs-模块

  • 解决方案:
root@ubuntu:/home/wangsx/libinstall/download/nginx-1.10.3# find /usr/include/ -name common_define.h
/usr/include/fastcommon/common_define.h

修改 obj/makefile,添加找到的路径

网络云盘项目-nginx添加fastdfs-模块

make&&make install
  • 启动 nginx
#/usr/local/nginx/sbin/nginx
root@ubuntu:/usr/local/nginx# ps -aux|grep nginx
root      13860  0.0  0.0  36836   600 ?        Ss   07:48   0:00 nginx: master process ./nginx
root      14072  0.0  0.0  21292   928 pts/2    S+   07:54   0:00 grep --color=auto nginx

发现worker 进程未启动

查看日志

vi ./logs/error.log

网络云盘项目-nginx添加fastdfs-模块

缺少配置文件 ,找到拷贝到目录下

root@ubuntu:~/libinstall/fastdfs-nginx-module-1.20/src# cp mod_fastdfs.conf /etc/fdfs/
  • 修改 mod_fastdfs.conf 配置文件

网络云盘项目-nginx添加fastdfs-模块

网络云盘项目-nginx添加fastdfs-模块

网络云盘项目-nginx添加fastdfs-模块

网络云盘项目-nginx添加fastdfs-模块

网络云盘项目-nginx添加fastdfs-模块

保存退出:

重启nginx

root@ubuntu:/etc/fdfs# ps -aux |grep nginx
root      14326  0.0  0.0  36836   604 ?        Ss   08:19   0:00 nginx: master process nginx
root      14331  0.0  0.0  21292  1084 pts/2    S+   08:19   0:00 grep --color=auto nginx

依旧没有worker进程

继续看log

网络云盘项目-nginx添加fastdfs-模块

解决方案:

root@ubuntu:~/libinstall/fastdfs-5.11/conf# cp http.conf /etc/fdfs/
root@ubuntu:/home/wangsx/libinstall/download/nginx-1.10.3/conf# cp mime.types /etc/fdfs/
root@ubuntu:~/libinstall/fastdfs-5.11/conf# nginx -s stop
root@ubuntu:~/libinstall/fastdfs-5.11/conf# nginx
root@ubuntu:~/libinstall/fastdfs-5.11/conf# ps aux |grep nginx
root      14740  0.0  0.0  36836   600 ?        Ss   08:35   0:00 nginx: master process nginx
nobody    14741  0.1  0.1  37276  3560 ?        S    08:35   0:00 nginx: worker process
root      14743  0.0  0.0  21292   928 pts/18   S+   08:35   0:00 grep --color=auto nginx

OK了~


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Google软件测试之道

Google软件测试之道

James A. Whittaker、Jason Arbon、Jeff Carollo / 黄利、李中杰、薛明 / 人民邮电出版社 / 2013-10 / 59.00元

每天,google都要测试和发布数百万个源文件、亿万行的代码。数以亿计的构建动作会触发几百万次的自动化测试,并在好几十万个浏览器实例上执行。面对这些看似不可能完成的任务,谷歌是如何测试的呢? 《google软件测试之道》从内部视角告诉你这个世界上知名的互联网公司是如何应对21世纪软件测试的独特挑战的。《google软件测试之道》抓住了google做测试的本质,抓住了google测试这个时代最......一起来看看 《Google软件测试之道》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具