单台服务器安装部署fastdfs

一、安装依赖包:libevent

[root@test-heji-web-165-217 src]# yum -y install libevent

二、安装libfastcommon

[root@test-heji-web-165-217 src]# wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz
[root@test-heji-web-165-217 src]# tar -zxvf V1.0.35.tar.gz
[root@test-heji-web-165-217 src]# cd libfastcommon-1.0.35
[root@test-heji-web-165-217 libfastcommon-1.0.35]# ./make.sh
[root@test-heji-web-165-217 libfastcommon-1.0.35]# ./make.sh install
#设置软连接
[root@test-heji-web-165-217 libfastcommon-1.0.35]# ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
[root@test-heji-web-165-217 libfastcommon-1.0.35]# ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so

三、安装FastDFS

[root@test-heji-web-165-217 src]# wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz
[root@test-heji-web-165-217 src]# tar -zxvf   V5.10.tar.gz
[root@test-heji-web-165-217 src]# cd fastdfs-5.10/
[root@test-heji-web-165-217 fastdfs-5.10]# ./make.sh
[root@test-heji-web-165-217 fastdfs-5.10]# ./make.sh install

安装完成后的目录:
1、服务脚本

[root@test-heji-web-165-217 fastdfs-5.10]# ll /etc/init.d/ |grep fdfs
-rwxr-xr-x 1 root root   918 Oct 24 11:16 fdfs_storaged
-rwxr-xr-x 1 root root   920 Oct 24 11:16 fdfs_trackerd

2、配置文件

[root@test-heji-web-165-217 fastdfs-5.10]# ll /etc/fdfs
-rw-r--r-- 1 root root 1461 Oct 24 11:16 client.conf.sample
-rw-r--r-- 1 root root 7927 Oct 24 11:16 storage.conf.sample
-rw-r--r-- 1 root root  105 Oct 24 11:16 storage_ids.conf.sample
-rw-r--r-- 1 root root 7389 Oct 24 11:16 tracker.conf.sample

3、命令行工具
[root@test-heji-web-165-217 fastdfs-5.10]# ll /usr/bin|grep fdfs
-rwxr-xr-x 1 root root 317456 Oct 24 11:16 fdfs_appender_test
-rwxr-xr-x 1 root root 317232 Oct 24 11:16 fdfs_appender_test1
-rwxr-xr-x 1 root root 304080 Oct 24 11:16 fdfs_append_file
-rwxr-xr-x 1 root root 303808 Oct 24 11:16 fdfs_crc32
-rwxr-xr-x 1 root root 304136 Oct 24 11:16 fdfs_delete_file
-rwxr-xr-x 1 root root 304872 Oct 24 11:16 fdfs_download_file
-rwxr-xr-x 1 root root 304464 Oct 24 11:16 fdfs_file_info
-rwxr-xr-x 1 root root 322384 Oct 24 11:16 fdfs_monitor
-rwxr-xr-x 1 root root 1111360 Oct 24 11:16 fdfs_storaged
-rwxr-xr-x 1 root root 327392 Oct 24 11:16 fdfs_test
-rwxr-xr-x 1 root root 326608 Oct 24 11:16 fdfs_test1
-rwxr-xr-x 1 root root 454000 Oct 24 11:16 fdfs_trackerd
-rwxr-xr-x 1 root root 305064 Oct 24 11:16 fdfs_upload_appender
-rwxr-xr-x 1 root root 306088 Oct 24 11:16 fdfs_upload_file

四、配置跟踪服务器(tracker server)

1、拷贝tracker server并重命名

[root@test-heji-web-165-217 fastdfs-5.10]#  cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

2、配置tracker server

#创建tracker server数据目录
[root@test-heji-web-165-217 fastdfs-5.10]# mkdir -p /data/fastdfs/tracker

[root@test-heji-web-165-217 fastdfs-5.10]# vi /etc/fdfs/tracker.conf
修改如下:
base_path=/data/fastdfs/tracker

测试启动tracker server,启动成功会自动在/data/fastdfs/tracker目录新建data和logs目录:
[root@test-heji-web-165-217 fastdfs-5.10]# /etc/init.d/fdfs_trackerd start
Reloading systemd: [ OK ]
Starting fdfs_trackerd (via systemctl): [ OK ]

[root@test-heji-web-165-217 fastdfs-5.10]# ll /data/fastdfs/tracker/
total 8
drwxr-xr-x 2 root root 4096 Oct 24 11:30 data
drwxr-xr-x 2 root root 4096 Oct 24 11:30 logs

查看是否有 tracker 进程

[root@test-heji-web-165-217 fastdfs-5.10]# ps aux | grep tracker
root     23791  0.0  0.
  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值