Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

FastDFS是一个开源的轻量级分布式文件系统,它对文件进行管理,功能包括:文件存储、文件同步、文件访问(文件上传、文件下载)等,解决了大容量存储和负载均衡的问题。在Centos 系统下如何安装配置FastDFS?

1:安装libevent(libevent-2.0.16-stable)

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

2:为Trackerd节点安装FastDFS,并修改配置文件/etc/fdfs/tracker.conf( 如果Trackerd需要使用内置的web server,需要修改make文件,启用WITH_HTTPD=1再编译) :

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

3:为Storaged节点安装FastDFS,Storaged节点也需要libevent,安装步骤参见第一步:

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

4:为Storaged节点安装web服务器,Storaged节点可以使用nginx或者apache提供http下载服务。这里我们选用nginx。

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

 

5:为Storaged节点安装fastdfs-nginx-module

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

6:修改nginx配置文件并保存退出 (vim /usr/local/nginx/conf/nginx.conf)

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

7:拷贝并修改nginx模块配置文件

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

8:修改Storaged节点的配置文件/etc/fdfs/storage.conf,启动Storaged

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

9:测试

Centos/linux 系统下如何安装配置FastDFS、nginx、fastdfs-nginx-module?

转载地址:http://os.51cto.com/art/201210/359890.htm