local]# cd /usr/local/fastdfs-master/
[root@fastdfs2 fastdfs-master]# ./make.sh
[root@fastdfs2 fastdfs-master]# ./make.sh install
拷贝配置文件
将fastdfs安装目录下的conf下的文件拷贝到/etc/fdfs/下
[root@fastdfs2 fastdfs-master]# cp -r conf/* /etc/fdfs/
自此fastdfs安装完成了,接下来配置trackerd和storaged,并启动它们。
fdfs可执行命令
[root@fastdfs2 fdfs]# ll /usr/bin/fdfs*
-rwxr-xr-x. 1 root root 210899 6月 8 21:00 /usr/bin/fdfs_appender_test
-rwxr-xr-x. 1 root root 210868 6月 8 21:00 /usr/bin/fdfs_appender_test1
-rwxr-xr-x. 1 root root 198740 6月 8 21:00 /usr/bin/fdfs_append_file
-rwxr-xr-x. 1 root root 198044 6月 8 21:00 /usr/bin/fdfs_crc32
-rwxr-xr-x. 1 root root 198735 6月 8 21:00 /usr/bin/fdfs_delete_file
-rwxr-xr-x. 1 root root 199112 6月 8 21:00 /usr/bin/fdfs_download_file
-rwxr-xr-x. 1 root root 198960 6月 8 21:00 /usr/bin/fdfs_file_info
-rwxr-xr-x. 1 root root 211836 6月 8 21:00 /usr/bin/fdfs_monitor
-rwxr-xr-x. 1 root root 762687 6月 8 21:00 /usr/bin/fdfs_storaged
-rwxr-xr-x. 1 root root 212997 6月 8 21:00 /usr/bin/fdfs_test
-rwxr-xr-x. 1 root root 212618 6月 8 21:00 /usr/bin/fdfs_test1
-rwxr-xr-x. 1 root root 329821 6月 8 21:00 /usr/bin/fdfs_trackerd
-rwxr-xr-x. 1 root root 199076 6月 8 21:00 /usr/bin/fdfs_upload_appender
-rwxr-xr-x. 1 root root 203766 6月 8 21:00 /usr/bin/fdfs_upload_file
View Code
配置并启动trackerd
修改trackerd.conf
不改也可以,但是要保证/home/yuqing/fastdfs路径存在
[root@fastdfs2 fdfs]# cd /etc/fdfs/
[root@fastdfs2 fdfs]# vi tracker.conf
将base_path=/home/yuqing/fastdfs改成base_path=/data/fastdfs
创建trackerd数据、日志目录
[root@fastdfs2 fdfs]# mkdir -p /data/fastdfs
启动trackerd
[root@fastdfs2 fdfs]# /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
查看trackerd进程,如下图:
说明trackered已经启动起来;其实也可以查看日志:/data/fastdfs/logs/trackerd.log,来判断trackerd是否正常启动起来。
配置并启动storaged
修改storage.conf
[root@fastdfs2 fdfs]# cd /etc/fdfs/
[root@fastdfs2 fdfs]# vi storage.conf
&nbs