Chinaunix首页 | 论坛 | 博客
  • 博客访问: 724199
  • 博文数量: 225
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2722
  • 用 户 组: 普通用户
  • 注册时间: 2013-02-03 17:32
文章分类

全部博文(225)

文章存档

2019年(7)

2018年(16)

2017年(1)

2016年(26)

2015年(41)

2014年(15)

2013年(119)

我的朋友

分类: Web开发

2013-07-24 20:52:40

Nginx 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,它已经在该站点运行超过两年半了。

1、下载 Nginx FastDFS 模块

文件我下载到了: /software/FastDFS/ 目录下

Nginx 安装参考 


 在第四步的时候: 改下编译参数:
./configure –prefix=/usr/local/nginx_fastdfs –with-pcre=/software/nginx/pcre-8.32 –add-module=/software/FastDFS/fastdfs-nginx-module/src

make
make install

编译下文件
vim /etc/fdfs/mod_fastdfs.conf

# the base path to store log files
base_path=/data1/fastdfs ====> 放置log的目录

# “host:port”, host can be hostname or ip address
tracker_server=192.168.3.220:22122 ====> tracker server的ip和端口,此处可以写多个tracker server,每行一个

# the group name of storage server
group_name=group1 ====> 此台storage server所属的服务器组名 可以不配置

# default value is false
url_have_group_name = false #====> 在URL中包含group名称 group1/M00/xxx

# store_path#, based 0, if store_path0 not exists, it’s value is base_path
# the paths must be exist
store_path0=/data1/fastdfs #====> 放置文件的目录

store_path_count=3
store_path0=/data1/fastdfs/store0
store_path1=/data1/fastdfs/store1
store_path2=/data1/fastdfs/store2

修改 模块 配置文件
vi /usr/local/nginx_fastdfs/conf/nginx.conf
location /M00 {
root /data1/fastdfs/store0/data;
ngx_fastdfs_module;
}

location /M01 {
root /data1/fastdfs/store1/data;
ngx_fastdfs_module;
}
location /M02 {
root /data1/fastdfs/store2/data;
ngx_fastdfs_module;
}

启动nginx /usr/local/nginx_fastdfs/sbin/nginx
上传文件 用浏览器 访问 如果正确安装成功。

阅读(1179) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~