centos6.2系统下安装配置FastDFS步骤:

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

##卸载系统自带libevent

rpm -qa|grep libevent rpm -e libevent*

##为Trackerd和Storaged节点节点安装libevent

cd /home/ylh

wget https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz

tar -zxvf libevent-2.0.16-stable.tar.gz

cd libevent-2.0.16-stable

make clean

./configure

make && make install

##为libevent创建软链接到/lib库下,64位系统对应/lib64

ln -s /usr/local/lib/libevent* /lib/

ln -s /usr/local/lib/libevent* /lib64/

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

cd /home/ylh

wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz

tar -zxvf FastDFS_v3.06.tar.gz

cd FastDFS_v3.06

./make.sh

./make.sh install

##创建存储目录

mkdir /home/ylh/fastdfs

##修改配置文件. vim /etc/fdfs/tracker.conf 修改后保存退出

##启动Trackerd

/usr/local/bin/fdfs_trackerd  /etc/fdfs/tracker.conf

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

cd /home/ylh

wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz

tar -zxvf FastDFS_v3.06.tar.gz

cd FastDFS_v3.06

./make.sh

./make.sh install

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

cd /home/ylh

wget http://nginx.org/download/nginx-0.8.55.tar.gz

tar zxvf nginx-0.8.55.tar.gz

cd nginx-0.8.55

./configure --prefix=/opt/nginx --with-http_stub_status_module

make && make install

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

cd /home/ylh

wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz

tar xzf fastdfs_nginx_module_v1.05.tar.gz

cd /home/ylh/nginx-0.8.55 ./configure --add-module=/home/ylh/fastdfs-nginx-module/src

make; make install

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

location /M00 {

root /home/ylh/fastdfs/data;

  ngx_fastdfs_module;

  }

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

cp /home/ylh/fastdfs-nginx-module/src/mod_fastdfs.conf  /etc/fdfs

vim 修改/etc/fdfs/mod_fastdfs.conf 保存退出

##启动nginx

/usr/local/nginx/sbin/nginx

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

##创建存储目录 mkdir /home/ylh/fastdfs

##修改配置 vim /etc/fdfs/storage.conf 修改后保存退出

##启动 Storaged

/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf

9:测试

## 修改客户端配置文件/etc/conf/client.conf文件并保存退出

##测试上传

/usr/local/bin/ fs_test /etc/conf/client.conf upload /home/a.jpg

如果上传成功回显信息中有文件的url,在浏览器中,输入url地址, tracker server会自动重定向到存储文件的storage server,文件下载成功。

至此,已经成功搭建了FastDFS

关于FastDFS的相关配置问题参考:

http://bbs.chinaunix.net/thread-1941456-1-1.html

http://bbs.chinaunix.net/thread-1920470-1-1.html

CentOS6.2下fastDFS的完整安装和配置步骤的更多相关文章

  1. [转] Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    from:  http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得 ...

  2. Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置

    原文:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建好j ...

  3. CentOS6.4下Mysql数据库的安装与配置

    原文连接:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 说到数据库,我们大多想到的是关系型数据库,比如 ...

  4. Linux学习之CentOS(十三)--CentOS6.4下Mysql数据库的安装与配置(转)

    原文地址:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 如果要在Linux上做j2ee开发,首先得搭建 ...

  5. Linux学习之CentOS(一)--CentOS6.6下Mysql数据库的安装与配置

    在这里我是通过yum来进行mysql数据库的安装的,通过这种方式进行安装,可以将跟mysql相关的一些服务.jar包都给我们安装好,所以省去了很多不必要的麻烦!!! [root@larry ~]# c ...

  6. CentOS6.5 下Haproxy服务的安装与配置

    参考网站: http://wenku.baidu.com/link?url=57AsCAL8TIv8NC3Vdnpd0hQ4fGNls8RFikjRWna3OaZb6qGHYTdV-4_wQPuzv8 ...

  7. CentOS6.4下Samba服务器的安装与配置

    一.先恶狠狠地吐槽一下: 这篇随笔真是让我折腾了2天2夜才敢下笔写!!!为什么呢?之前是通过去Samba的官网下载的源码包,也就是.tar.gz来进行安装配置,不过这个让我折腾来折腾去就是没折腾出结果 ...

  8. Linux CentOS6.4下Mysql数据库的安装与配置

    一.mysql简介 说到数据库,我们大多想到的是关系型数据库,比如mysql.oracle.sqlserver等等,这些数据库软件在windows上安装都非常的方便,在Linux上如果要安装数据库,咱 ...

  9. CentOS6.5下Mysql数据库的安装与配置

    一.mysql简介 说到数据库,我们大多想到的是关系型数据库,比如mysql.oracle.sqlserver等等,这些数据库软件在windows上安装都非常的方便,在Linux上如果要安装数据库,咱 ...

随机推荐

  1. ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

    引子: 本项目在老电脑上用的是oracle10g,换新电脑装的是oracle11g,但运行项目本没有什么关系,本来说创建个用户,用PLSQL手工导入数据,再改几下配置文件即可跑起来--但实际启动中遇到 ...

  2. C++字符串分割

    //字符串分割函数 std::vector<std::string> split(std::string str,std::string pattern) { std::string::s ...

  3. Remote Desktop manager 连接后无法自动登录

    现象: Remote Desktop manager 连接后无法自动登录 用Windows 自带的远程桌面 可以自动登录 解决方法: 在指定站点 右键 Edit Entry. 如下图处打勾就可以了.

  4. poj 2485 Highways(最小生成树,基础,最大边权)

    题目 //听说听木看懂之后,数据很水,我看看能不能水过 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stri ...

  5. POJ1860Currency Exchange(SPFA)

    http://poj.org/problem?id=1860 题意:  题目中主要是说存在货币兑换点,然后现在手里有一种货币,要各种换来换去,最后再换回去的时候看能不能使原本的钱数增多,每一种货币都有 ...

  6. ElasticSearch Java api 详解_V1.0

    /×××××××××××××××××××××××××××××××××××××××××/ Author:xxx0624 HomePage:http://www.cnblogs.com/xxx0624/ ...

  7. Minimum_Window_Substring两种方法求解

    题目描述: Given a string S and a string T, find the minimum window in S which will contain all the chara ...

  8. [hackerrank]Manasa and Stones

    https://www.hackerrank.com/contests/w2/challenges/manasa-and-stones 简单题. #include<iostream> us ...

  9. 1、Web容器的理解&Tomcat的安装与配置

    Web容器的理解 <Java Web开发实战经典——基础篇>一书中对Web容器这一概念阐述得很好,借用其观点对Web容器加以理解: 想要运行一个Java Web的程序,则必须有相应的Web ...

  10. 离线应用Application Cache详解

    特点:     1.离线可访问            - 没有网络仍可访问整个应用     2.很小的服务器负载  - 缓存在本地,不需要到服务器请求     3.高速                 ...