ubuntu16.04安装fastdfs
时间: 2023-04-25 09:02:01 浏览: 162
fastdfs的安装
以下是ubuntu16.04安装fastdfs的步骤:
1. 安装依赖库
sudo apt-get update
sudo apt-get install libevent-dev libcurl4-gnutls-dev libfreetype6-dev libjpeg62-turbo-dev libpng12-dev libxml2-dev libxslt1-dev libssl-dev zlib1g-dev
2. 下载fastdfs
wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
3. 解压fastdfs
tar -zxvf V5.11.tar.gz
4. 编译安装tracker和storage
cd fastdfs-5.11/
./make.sh
./make.sh install
5. 配置tracker和storage
cd /etc/fdfs/
cp tracker.conf.sample tracker.conf
cp storage.conf.sample storage.conf
cp client.conf.sample client.conf
6. 修改tracker.conf和storage.conf
tracker.conf:
base_path=/var/fdfs/tracker
port=22122
http.server_port=8888
storage.conf:
base_path=/var/fdfs/storage
store_path=/var/fdfs/storage
tracker_server=127...1:22122
http.server_port=8889
7. 启动tracker和storage
sudo /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
sudo /usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
8. 测试fastdfs
sudo apt-get install git
git clone https://github.com/happyfish100/fastdfs-client-java.git
cd fastdfs-client-java/
mvn clean package
java -jar target/fastdfs-client-java-1.27-SNAPSHOT.jar
以上就是ubuntu16.04安装fastdfs的步骤,希望对你有帮助。
阅读全文