在 Ubuntu 上安装部署 FastDFS(分布式文件系统)分为以下步骤。这里以 FastDFS v6.11 为例(最新稳定版),包含 Tracker Server、Storage Server 和 Nginx 模块(提供 HTTP 访问):
一、安装依赖
sudo apt update
sudo apt install -y git gcc make automake autoconf libtool pkg-config libssl-dev libpcre3-dev zlib1g-dev
二、安装 libserverframe
- 安装 libserverframe
git clone https://github.com/happyfish100/libserverframe.git --depth 1
cd libserverframe
sudo ./make.sh clean
sudo ./make.sh && sudo ./make.sh install
- 创建必要符号链接
修复头文件路径问题
sudo ln -s /usr/include/sf /usr/include/fastcommon/sf
修复库文件路径问题
sudo ldconfig
三、安装 libfastcommon(基础库)
下载源码
git clone https://github.com/happyfish100/libfastcommon.git --depth 1
cd libfastcommon
编译安装
sudo ./make.sh clean
sudo ./make.sh && sudo ./make.sh install
确认库文件路径(通常安装到 /usr/lib64 或 /usr/lib)
sudo ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so # 如果提示找不到则执行
四、安装 FastDFS
下载源码
git clone https://github.com/happyfish100/fastdfs.git --depth 1
cd fastdfs

