sudo ./configure --add-module=/root/libinstall/fastdfs-nginx-module-1.20/src
makenginx
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,添加找到的路徑ubuntu
make&&make install
#/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 進程未啓動
查看日誌c#
vi ./logs/error.log
缺乏配置文件 ,找到拷貝到目錄下spa
root@ubuntu:~/libinstall/fastdfs-nginx-module-1.20/src# cp mod_fastdfs.conf /etc/fdfs/
保存退出:
重啓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進程
繼續看logcode
解決方案:進程
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了~ip
修改、/usr/local/nginx/conf/nginx.conf配置文件
添加以下:源碼
nginx -s reload
成功效果以下:域名
至此,nginx+fastdfs配置完成。