centos 5.7 64位安装FastDFSv3.06
来源:互联网 发布:javascript常用对象 编辑:程序博客网 时间:2024/06/05 18:07
fastdfs、php_client、fastdfs-nginx-module、nginx、php、各种版本不兼容,如果一直报错无法解决,尝试换版本吧。。。
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,文件下载成功。
- centos 5.7 64位安装FastDFSv3.06
- FastDFSV3.02的安装和配置、迁移
- CENTOS 64位安装32位jdk
- CentOS 64位 安装chrome
- CentOS 64位安装hadoop
- CentOS 64位 安装openfire
- CentOS 7.2 64位安装LNMP php7+Mysql 5.7
- centos 64位 java tomcat 安装简要
- centos 6.3 64位 安装 Xen
- CentOS 6.4 64位 安装 rails 环境
- centos 6.2 64位安装vnc
- 64位centos安装bugfree的方法
- U盘安装64位CentOS 6.4
- centos 6.5 64位 安装 vnc 远程桌面
- VirtualBox安装64位的CentOS问题
- LINUX-CENTOS 6.4 64 位 系统安装
- CentOS 6.5 64位 MySQL源码安装
- 64位centos下安装 matlab
- WFDB 软件包
- linux 触摸屏驱动分析
- 使用安装在linux端的loadgenerator,在controller加载并发人数受限的问题解决
- Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- OpenCV训练分类器制作xml文档
- centos 5.7 64位安装FastDFSv3.06
- MySQL常用命令大全一(Linux)
- 编译HostAp过程
- linux 触摸屏驱动分析
- IOS applicationWillResignActive
- ListView滑动过程中图片显示重复错乱闪烁问题解决
- 详解EBS接口开发之供应商导入
- 关于大数据的八大热点问题
- WPF中的模板