FastDFS学习笔记 -- day02 安装配置
来源:互联网 发布:情趣内衣淘宝 编辑:程序博客网 时间:2024/06/10 11:47
一、下载
1、下载的地址有两个:
http://sourceforge.net/projects/FastDFS/
或者
https://github.com/happyfish100/FastDFS(推荐)
2、本教程下载的为:FastDFS_v5.05.tar.gz
二、安装配置
1、安装gcc环境
[root@localhost local]# yum install -y gcc-c++
2、安装libvenet,libevent是FastDFS依赖的库
[root@localhost local]# yum install -y libevent
3、安装 libfastcommon
libfastcommon是FastDFS官方提供的包,包含了FastDFS运行所需要的一些基础库
(1)、上传并解压 libfastcommonV1.0.7.tar.gz
[root@localhost fdfs]# tar -zxvf libfastcommonV1.0.7.tar.gz
(2)、进入目录,编译安装
[root@localhost libfastcommon-1.0.7]# ./make.sh
[root@localhost libfastcommon-1.0.7]# ./make.sh install
(3)、拷贝libfastcommon.so文件至 /usr/lib 目录下
libfastconnom.so文件位于 /usr/lib64/目录下
[root@localhost lib64]# cp libfastcommon.so /usr/lib
注意:libfastcommon安装好后会自动将库文件拷贝至/usr/lib64下,由于FastDFS程序引用usr/lib目录,所以需要将/usr/lib64下的库文件拷贝至/usr/lib下。
4、安装FastDFS
(1)、上传并解压缩 FastDFS_v5.05.tar.gz
(2)、进入FastDFS目录进行编译安装
[root@localhost FastDFS]# ./make.sh
[root@localhost FastDFS]# ./make.sh install
5、拷贝FastDFS/conf目录下的文件到/etc/fdfs目录下
[root@localhost FastDFS]# cp conf/* /etc/fdfs/
6、配置FastDFS
进入/etc/fdfs 目录,注意:配置文件中的base_path和store_path0目录要存在,需要先创建出来。
(1)、创建base_path和store_path0文件夹
[root@localhost storage]# mkdir /usr/local/fastdfs/tracker –p
[root@localhost storage]# mkdir /usr/local/fastdfs/storage –p
(2)、Tracker配置,修改 tracker.conf,配置base_path的路径
[root@localhost fdfs]# vim tracker.conf
(3)、配置storage,修改storage.conf配置文件
# 指定storage组名group_name=group1# the base path to store data and log files# 配置数据存储位置base_path=/usr/local/fastdfs/storage# 指定挂在磁盘位置。store_path0=/usr/local/fastdfs/storage# 如果有多个挂载磁盘则定义多个store_path,如下# store_path1=.....# store_path2=......# 配置tracker服务器IP和端口# tracker_server can ocur more than once, and tracker_server format is# # "host:port", host can be hostname or ip addresstracker_server=192.168.200.132:22122# 如果有多个则配置多个tracker# tracker_server=192.168.200.132:22122# tracker_server=192.168.200.133:22122
三、启动FastDFS
1、正常启动
Tracker启动命令:
[root@localhost /]# ./usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
Storage启动命令:
[root@localhost /]# ./usr/bin/fdfs_storaged /etc/fdfs/storage.conf
2、设置开机自动启动
需要将开机启动的命令添加到系统文件中
(1)、编辑系统文件,将命令行添加进文件
[root@localhost /]# vim /etc/rc.d/rc.local
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
阅读全文
0 0
- FastDFS学习笔记 -- day02 安装配置
- FastDFS+Nginx安装配置笔记
- FastDFS+Nginx安装配置笔记
- FastDFS+Nginx安装配置笔记
- FastDFS安装与配置笔记
- fastdfs学习笔记之安装
- 【FastDFS】FastDFS安装配置
- activeMQ学习笔记 -- day02安装测试
- java 学习笔记 day02
- Jquery学习笔记---Day02
- C++ 学习笔记day02
- mysql 学习笔记 day02
- Java学习笔记 day02
- oracle学习笔记--day02
- Java学习笔记Day02
- Qt学习笔记day02
- e3mall Day02 学习笔记
- struts2 day02学习笔记
- ntohs, ntohl, htons,htonl的比较和详解
- Ubuntu16.04 下安装jenkins
- oracle 函数使用
- mysql from_unixtime函数 和 存储过程
- 苹果p12文件--一个证书如何给多人使用
- FastDFS学习笔记 -- day02 安装配置
- python3使用pickle读取文件提示TypeError或者UnicodeDecodeError的解决办法
- Android对话框Dialog,PopupWindow,Toast的实现机制
- 解决android软键盘弹出有时会遮住EditText输入框的一种方法
- Why Ice Cream Sandwich Crashes your App
- 20170613Link
- Kotlin and Rxjava on Android
- 图像拼接算法总结(二)
- Oculus开通VR体验设计博客,为VR开发者分享经验教训