在nginx和fastdfs配合使用
来源:互联网 发布:手机幻灯片制作软件 编辑:程序博客网 时间:2024/06/06 09:05
nginx有一个插件叫fastdfs-nginx-module_v1.16.tar.gz
1.解压安装
2.解压后的
fastdfs-nginx-module/src/config 文件内容需要修改
一共有三处 /usr/后面的local删除掉,删之前可以先进去目录看看有没有此文件夹,视版本而定
LES="$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 -L/usr/lib -lfastcommon -lfdfsclient"
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/etc/fdfs/mod_fastdfs.conf\"'"
3.
1、对nginx重新config
./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 \
--add-module=/路径下的/xxxx/xxx/xxx/xxxxxfastdfs-nginx-module/src
1、make
2、make install
3、把/ 路径下的 /xxxx/xxxxx/fastdfs-nginx-module/src/mod_fastdfs.conf文件复制到/etc/fdfs目录下。编辑:
store_path0=/home/yuqing/fastdfs#文件保存路径
base_path=/x/xx/x/x/x/x #需要存在一个真实路径
tracker_server=192.168.158.130:22122 # tracker服务器地址和端口
url_have_group_name=true #由默认的false改成true
在nginx的配置文件中添加一个Server:
#http://192.168.158.130/group1/M00/00/00/wKiegldP8u6AJ5u7AADtVgGdiYo511.jpgserver {
listen 80;
server_name 192.168.158.130; 这里需要是本机(虚拟机)的IP地址
location /group1/M00/{
root /home/yuqing/fastdfs/data/;
ngx_fastdfs_module;
启动NGINX访问生成图片的IP地址 OK.
- 在nginx和fastdfs配合使用
- Nginx和Tomcat配合使用
- fastdfs-安装fastdfs-nginx-module和配置使用(二)
- nginx 使用fastdfs-nginx-module 比直接使用nginx的优势在哪
- nginx + node.js配合使用
- Nginx+Tomcat的配合使用
- fastDFS安装和使用
- TFS和FastDFS使用
- fastDFS原理和使用
- FastDFS配置和使用
- 在虚拟机(CentOS)上配置fastdfs+nginx
- 在centoos6.5+FastDFS 中Nginx配置
- Nginx + FastDFS
- fastdfs nginx
- Nginx+FastDFS
- fastDFS+nginx
- Fastdfs+nginx
- FastDFS+Nginx轻量级分布式文件系统安装使用
- 欢迎使用CSDN-markdown编辑器
- OpenglES2.0 for Android:来画个圆吧
- eclipse 插件安装
- 深入学习java并发编程:线程池ThreadPoolExecutor实现以及使用
- mac 下git命令自动补全
- 在nginx和fastdfs配合使用
- Java线程安全
- Android多文件下载时多个进度条同时更新
- 我的博客即将入驻“云栖社区”,诚邀技术同仁一同入驻。
- android sharedpreferences
- 在不同的维度做防御
- ajax请求中文乱码(解决)
- 初识shell
- Cadence 中贴片元件焊盘的制作