`

【FastDFS专题】fastdfs使用实战(安装篇)

 
阅读更多

   目前FastDFS支持类Unix系统,在Linux和FreeBSD下测试过,本文使用的是CentOS5.5,建议安装之前先了解一下FastDFS的原理,这对后面配置部分有帮助。http://lxsym.blog.51cto.com/1364623/744826
 
一、安装libevent
    FastDFS 内部绑定了 libevent 作为 http 服务器 ,在V2.X版本必须安装 libevent,本文安装的是V2.2版本,因此必须安装libevent。
如果已经安装了 libevent,请确认安装路径是 /usr , 因为 FastDFS 在编译源程序时,需要到此目录下查找一些依赖文件,否则编译 FastDFS 会出错 。如果不是,建议首先卸载 libevent ,然后安装到 /usr 下。本文安装的是libevent-2.0.15-stable ,下载地址: http://monkey.org/~provos/libevent/

安装步骤:
解压 libevent ,然后进入解压后的目录分别执行:
[root@study_web_t1 software]# tar zxvf libevent-2.0.15-stable.tar.gz
[root@study_web_t1 software]# cd libevent-2.0.15-stable
[root@study_web_t1 software]# ./configure --prefix=/usr
[root@study_web_t1 software]# make && make install
安装libevent完成。
 
二、安装 FastDFS
1、下载 FastDFS 源程序,下载地址 http://code.google.com/p/fastdfs/downloads/list,这里下载的是 FastDFS_v3.02.tar.gz
可以到https://github.com/happyfish100/fastdfs/releases 下载最新版本的FastDFS
2、在 FastDFS_v2.02.tar.gz 所在文件夹下执行:
[root@study_web_t1 software]# tar zxvf FastDFS_v3.02.tar.gz
[root@study_web_t1 software]# cd FastDFS/
3、由于要使用内置的 http 服务,编辑make.sh 文件,找到
 #WITH_HTTPD=1  取消注释
4、进入 fastdfs 目录,执行:
[root@study_web_t1 fastdfs]# ./make.sh    #可选择安装路径
[root@study_web_t1 fastdfs]# ./make.sh install  
如果运行如上命令后,在命令行信息最后看到类似
if [ 1 -eq 1 -a /usr/local/lib = "/usr/local/lib" ]; then sh ./fdfs_link_library.sh; fi
已经安装成功!

 

本文出自 “Richard Shen运维/架构” 博客,请务必保留此出处http://lxsym.blog.51cto.com/1364623/744839

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics