当前位置: 首页 > Linux

DFS安装避坑

时间:2023-04-06 01:39:34 Linux

DFS避坑dfs环境搭建docker搭建fastDFS教程教程链接地址win10下docker搭建fastDFS基本上可以按照教程搭建成功,但是稳定性比较差。docker重启后环境可能会出现各种问题。建议在linux环境下搭建。CentOS上构建FastDFS+nginx教程链接地址按照这本教材多次在CentOS上构建FastDFS+nginx,记录一些坑在里面。避免坑一,版本问题首先下载软件注意版本,一定要注意版本匹配,否则安装过程中可能会出现编译错误或者各种奇怪的问题无法安装fastdfs-6.00libfastcommon-1.0.43fastdfs-nginx-module-1.21[nginx-1.18.0](https://nginx.org/en/download...避坑2.如果有fastDFS安装,./make时出错。shcompilation---perl:commandnotfound执行以下命令即可解决yum-yinstallzlibzlib-develpcrepcre-develgccgcc-c++opensslopenssl-devellibeventlibevent-develperlunzipnet-toolswget闭坑三,fastdfs集成nginx后,如果使用ssl,可能会导致如果出现nginx无法启动的问题,如nginx:[emerg]the"ssl"parameterrequiresngx_http_ssl_modulein/usr/local/nginx/conf/nginx.conf:37、编译nginx时需要加上--with-http_stub_status_module。也可能是缺少stub_status模块的问题,添加--with-http_stub_status_module./configure\--prefix=/usr/local/nginx\--pid-path=/var/run/nginx/nginx.pid时编译\--lock-path=/var/lock/nginx.lock\--error-log-path=/var/log/nginx/error.log\--http-log-path=/var/log/nginx/access.log\--with-http_gzip_static_module\--http-client-body-temp-path=/var/temp/nginx/client\--http-proxy-temp-path=/var/temp/nginx/proxy\--http-fastcgi-temp-path=/var/temp/nginx/fastcgi\--http-uwsgi-temp-path=/var/temp/nginx/uwsgi\--http-scgi-temp-path=/var/temp/nginx/scgi\--with-http_ssl_module\--with-http_stub_status_module\--add-module=/soft/fastdfs-nginx-module/src#注意这里的配置必须是fastdfs-nginx的src-module目录绝对路径Others(使用的命令)starttracker/usr/bin/fdfs_trackerd/etc/fdfs/tracker.confrestartstartstorage/usr/bin/fdfs_storaged/etc/fdfs/storage.confrestart重新加载nginx配置文件cd/usr/local/nginx/sbin./nginx-sreloadstartnginxcd/usr/local/nginx/sbin./nginx测试上传文件/usr/bin/fdfs_test/etc/fdfs/client.conf上传/home/test.jpg