#修改storage.conf配置
vim /etc/fdfs/storage.conf
# the name of the group this storage server belongs to
group_name=group1 ->group_name=group2
# the name of the group this storage server belongs to
# the storage server port #the storage server port
port=23000
# the base path to store data and log files #日志目录
base_path=/home/yuqing/fastdfs -> /home/fastdfs/fdfs_storage
# store_path#, based 0, if store_path0 not exists, it's value is base_path #data数据存储目录
# the paths must be exist
store_path0=/home/fastdfs/fdfs_storage
# tracker_server can ocur more than once, and tracker_server format is
# "host:port", host can be hostname or ip address
tracker_server=192.168.209.121:22122 -> tracker_server=192.168.127.11:22122
#启动storage Server
/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf
#接下来会出现很多mkdir data path,这是系统在创建数据目录
data path: /home/fastdfs/fdfs_storage/data, mkdir sub dir...
mkdir data path: 00 ...
mkdir data path: 01 ...
mkdir data path: 02 ...
mkdir data path: 03 ...
.......................
data path: /home/fastdfs/fdfs_storage/data, mkdir sub dir done.
#启动成功,加入开机启动
# vim /etc/rc.d/rc.local
/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf
启动完成后可以 telnet 192.168.13.218 23000 (iptables 开放23000端口) 看服务是否启动
日志在 /home/fastdfs/fdfs_storage 目录下
12.6. 如何重启server进程?
可以kill掉server进程后,执行启动命令行。如:
killall fdfs_trackerd
/usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
或者直接使用FastDFS自带的restart.sh脚本,如:
重启tracker
/usr/local/bin/restart.sh /usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf
重启storage
/usr/local/bin/restart.sh /usr/local/bin/fdfs_storated /etc/fdfs/storage.conf