1、标题阿里云服务器需要打开安全组端口
2、软件准备
git clone https://github.com/happyfish100/fastdfs.git
git clone https://github.com/happyfish100/libserverframe.git
git clone https://github.com/happyfish100/libfastcommon.git
3、安装
cd libfastcommon;
./make.sh clean && ./make.sh && ./make.sh install/
cd libserverframe;
./make.sh clean && ./make.sh && ./make.sh install
cd fastdfs;
./make.sh clean && ./make.sh && ./make.sh install
4、设置配置文件
./setup.sh /etc/fdfs
5、修改配置
vi /etc/fdfs/tracker.conf
vi /etc/fdfs/storage.conf
vi /etc/fdfs/client.conf
6、启动服务
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart
或者
/sbin/service fdfs_trackerd restart
/sbin/service fdfs_storaged restart
7、上传测试
/usr/bin/fdfs_upload_file /etc/fdfs/client.conf /home/a.txt
上传成功
返回文件的存储目录:/opt/fastdfs/data/00/00/CIsER2b2E–AX6OzAAAAA01rUT0181.txt