下载
fastdfs100-libfastcommon-V1.0.43 fastdfs100-fastdfs-V6.03
链接:https://pan.baidu.com/s/1PWcC8Yjg9w3UBG-wX5Y7Ww
提取码:bt4r
编译
./make.sh
./make.sh install
启动
fdfs_trackerd /etc/fdfs/tracker.conf start
fdfs_storaged /etc/fdfs/storage.conf start
测试
fdfs_test /etc/fdfs/client.conf upload anTest.jpg
编译nginx扩展模块
(nginx-1.18.0.tar.gz fastdfs100-fastdfs-nginx-module-V1.22)
nginx -V
./configure --prefix=/home/fdfs/nginx_bin --add-module=/home/yuqing/fastdfs-nginx-module/src
make install
重启nginx
/usr/local/nginx/sbin/nginx -s stop; /usr/local/nginx/sbin/nginx
ln -s /home/yuqing/fastdfs/data /home/yuqing/fastdfs/data/M00
注意事项
(1)选取对应版本
(2)注意配置文件
配置文件
vim client.conf
tracker_server=192.168.110.21:22122
http.tracker_server_port=8888
vim storage.conf
bind_addr=192.168.110.21
tracker_server=192.168.110.21:22122
http.server_port=8888
vim tracker.conf
bind_addr=192.168.110.21
http.server_port=8888
vim /etc/fdfs/mod_fastdfs.conf
tracker_server=192.168.110.21:22122
url_have_group_name = true
nginx.conf
server {
listen 9093;
server_name 192.168.111.231;
location / {
root /home/yuqing/fastdfs/data;
ngx_fastdfs_module;
}
}
fastdfs-nginx-module模块会用到:
anti-steal.jpg
http.conf
mime.types
参考:
https://www.cnblogs.com/chiangchou/p/fastdfs.html