Files
one-click-shell/centos-fastdfs/README.md
2022-03-11 18:25:52 +08:00

46 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## FastDFS 快速配置安装
### 依赖包
```sh
# 下载依赖包
wget http://1453788.d.cturls.net/down/1453788/fastdfs/FastDFS.tar.gz -O FastDFS.tar.gz
# 解压依赖包
tar -zxvf FastDFS.tar.gz
# 进入文件夹
cd FastDFS
```
### 脚本参数修改
根据自己的需求修改shell脚本中的定义的 `端口``ip``安装目录`等内容,除了`ip地址`外,其他都可以使用默认。
```sh
#定义配置参数
# 公网 ip
ip="43.135.68.128" #服务器的IP根据实际情况修改
# 命令行获取当前的 ip
# ip = `ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
tracker_port="22122" #跟踪服务器端口号,一般使用默认,不用修改
storage_port="23000" #存储服务器端口号,一般使用默认,不用修改
nginx_port="80" #Nginx端口号根据实际情况修改
````
### 执行一键安装脚本
```sh
chmod +x centos-fasdfs-install.sh
sh centos-fasdfs-install.sh
```
### 测试文件上传及访问
```sh
fdfs_upload_file /etc/fdfs/client.conf /tmp/a.txt
```
返回FID表示成功 如:`group1/M00/00/00/xx.txt`