centOs安装fastdfs
时间: 2023-11-17 14:02:53 浏览: 236
centos系统上安装fastdfs
是在CentOS上安装FastDFS的步骤:
1. 安装依赖库和工具:
```shell
yum install -y wget gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl openssl-devel
```
2. 下载FastDFS:
```shell
wget https://github.com/happyfish100/fastdfs/archive/V5.11.tar.gz
```
3. 解压并编译FastDFS:
```shell
tar -zxvf V5.11.tar.gz
cd fastdfs-5.11/
./make.sh
./make.sh install
```
4. 配置Tracker服务器:
```shell
cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
```
编辑tracker.conf文件,修改以下配置:
```shell
base_path=/var/fdfs/tracker
port=22122
```
5. 配置Storage服务器:
```shell
cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
```
编辑storage.conf文件,修改以下配置:
```shell
base_path=/var/fdfs/storage
store_path0=/var/fdfs/storage
tracker_server=10.39.XX.XX:22122
```
6. 配置客户端:
```shell
cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
```
编辑client.conf文件,修改以下配置:
```shell
base_path=/var/fdfs/client
tracker_server=10.39.XX.XX:22122
```
7. 启动Tracker和Storage服务器:
```shell
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
```
8. 测试FastDFS是否安装成功:
```shell
/usr/bin/fdfs_test
```
阅读全文