1、安装依赖
yum install make cmake gcc gcc-c++ unzip zip
2、解压并安装 libfastcomm-master.zip
unzip ../soft-ware/libfastcommon-master.zip
cd libfastcommon-master/
./make.sh
./make.sh install
3、解压 并安装 FastDFS_v5.08.tar.gz
tar -zxvf ../soft-ware/FastDFS_v5.08.tar.gz
cd FastDFS/
./make.sh
./make.sh install
ls -lh /etc/init.d/fdfs_*
-rwxr-xr-x 1 root root 918 Aug 14 11:43 /etc/init.d/fdfs_storaged
-rwxr-xr-x 1 root root 920 Aug 14 11:43 /etc/init.d/fdfs_trackerd
4、查看配置、命令文件
ls -lh /etc/fdfs/
total 20K
-rw-r--r-- 1 root root 1.5K Aug 14 11:43 client.conf.sample
-rw-r--r-- 1 root root 7.8K Aug 14 11:43 storage.conf.sample
-rw-r--r-- 1 root root 7.1K Aug 14 11:43 tracker.conf.sample
~~~ ls -lh /usr/bin/fdfs_*
-rwxr-xr-x 1 root root 388K Aug 14 11:43 /usr/bin/fdfs_appender_test
-rwxr-xr-x 1 root root 388K Aug 14 11:43 /usr/bin/fdfs_appender_test1
-rwxr-xr-x 1 root root 375K Aug 14 11:43 /usr/bin/fdfs_append_file
-rwxr-xr-x 1 root root 374K Aug 14 11:43 /usr/bin/fdfs_crc32
-rwxr-xr-x 1 root root 375K Aug 14 11:43 /usr/bin/fdfs_delete_file
-rwxr-xr-x 1 root root 376K Aug 14 11:43 /usr/bin/fdfs_download_file
-rwxr-xr-x 1 root root 375K Aug 14 11:43 /usr/bin/fdfs_file_info
-rwxr-xr-x 1 root root 394K Aug 14 11:43 /usr/bin/fdfs_monitor
-rwxr-xr-x 1 root root 1.4M Aug 14 11:43 /usr/bin/fdfs_storaged
-rwxr-xr-x 1 root root 398K Aug 14 11:43 /usr/bin/fdfs_test
-rwxr-xr-x 1 root root 397K Aug 14 11:43 /usr/bin/fdfs_test1
-rwxr-xr-x 1 root root 551K Aug 14 11:43 /usr/bin/fdfs_trackerd
-rwxr-xr-x 1 root root 375K Aug 14 11:43 /usr/bin/fdfs_upload_appender
-rwxr-xr-x 1 root root 377K Aug 14 11:43 /usr/bin/fdfs_upload_file
## 5、配置tracker服务器
cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
vim /etc/fdfs/tracker.conf
disabled=false
port=22122
base_path=/data/fastdfs/tracker
store_group=group2
## 6、 配置stroage
cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
vim /etc/fdfs/storage.conf
disabled=false
group_name=group2
port=23000
base_path=/data/fastdfs/storage
store_path0=/data/fastdfs/storage
tracker_server=127.0.0.1:22122
http.server_port=8888
## 7、启动
systemctl start fdfs_storaged
systemctl start fdfs_trackerd
或者
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf
## 8、查看进程
ps aux|grep fdfs
root 114809 0.0 0.0 146100 2560 ? Sl 14:56 0:00 /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf
root 115296 1.8 0.4 82676 67700 ? Sl 15:12 0:00 /usr/bin/fdfs_storaged /etc/fdfs/storage.conf
注意:启动后如没有进程可以查看日志文件进行分析:
tail /data/fastdfs/storage/logs/storage.log
tail /data/fastdfs/tracker/logs/tracker.log




