![](https://csdnimg.cn/release/download_crawler_static/9946759/bg4.jpg)
巴巴网(www.baba.io)为您提供图书、文档、源码、工具等资源的下载,是您最好的资源下载网。
本系列文档,由巴巴网(www.baba.io)独家发行,如需最新版本,请访问 www.baba.io
a. 在 192.168.10.11 上,创建 tracker 数据及日志存放目录
[root@localhost ~]# mkdir -p
/data/fastdfs/tracker
b. 修改 FastDFS 配置文件 tracker.conf
[root@localhost ~]# vim /etc/fdfs/tracker.conf
base_path=/data/fastdfs/tracker
max_connections=1024
##工作线程数,通常设置为 CPU 数
work_threads=8
store_lookup=0
store_server=0
store_path=0
download_server=0
reserved_storage_space=4G
run_by_group=fastdfs
run_by_user=fastdfs
rotate_error_log=true
c. 修改 Nginx 配置文件
[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
user www www;
worker_processes 8;
pid /usr/local/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/nginx/logs/access.log main;
upstream server_g1{
server 192.168.10.12:80;
server 192.168.10.13:80;
}