- 浏览: 254926 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (298)
- 工作感悟 (6)
- java基础 (23)
- 计算机硬件知识 (1)
- 计算机网络知识 (2)
- Struts (3)
- Srping (4)
- hibernate (0)
- ibatis (0)
- webservice (4)
- Thread (22)
- maven (5)
- ubuntu/linux/centos/redhat (46)
- SSO (1)
- ESB (0)
- 工作流 (0)
- oracle (15)
- 云计算 (1)
- hadoop (1)
- nosql (0)
- mysql (3)
- sqlserver (0)
- jquery (0)
- 分布式 (3)
- 集群 (0)
- 设计模式 (2)
- EJB (0)
- map (0)
- cache (5)
- Niginx+varnish+squid+Ats (14)
- Apache (0)
- 工作/职业规划 (0)
- Scala & Groovy (1)
- English (4)
- 数据结构/算法 (6)
- 开发工具 (5)
- 测试 (2)
- Exception (0)
- 定时器 (3)
- j2ee (2)
- 部署 (1)
- Openssl (1)
- 操作系统 (3)
- kvm (13)
- libvirt (5)
- PostgreSql (5)
- 虚拟化 (3)
- 概念理解 (1)
- virt-manager (1)
- RESTful (3)
- 其它 (4)
- ssh2 (14)
- windows (1)
- 房产 (2)
- svn (1)
- 手机 (1)
- ant (1)
- flume (2)
- sqoop (1)
- fastdfs (5)
- log4j (1)
- SPDY (1)
- mongodb (2)
- MQ (2)
- Mina (1)
- dubbo (4)
- PMP (1)
- Webshpere (2)
- jvm (1)
- Btrace (1)
- zookeeper (7)
- UML (1)
- spring cloud (6)
- spring boot (5)
- storm (0)
- 软件管理 (1)
- elasticsearch (1)
- 协议 (2)
- docker (1)
- 性能 (2)
- 安全 (1)
- 代码规范 (1)
- mqtt (1)
- lombok (1)
- 车联网 (1)
- kafka (1)
最新评论
1.ngix+cache配置文件
2.fdfs-ngix-module配置
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } 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 logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; #设置缓存参数 server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 300m; sendfile on; tcp_nopush on; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 16k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; #设置缓存存储路径、存储方式、分配内存大小、磁盘最大空间、缓存期限 #keys_zone=cache1:100m 表示这个zone名称为cache1,分配的内存大小为100MB #/data/ngx_cache/cache1 表示cache1这个zone的文件要存放的目录 #levels=1:2 表示缓存目录的第一级目录是1个字符,第二级目录是2个字符,即/data/ngx_cache/cache1/a/1b这种形式 #inactive=1d 表示这个zone中的缓存文件如果在1天内都没有被访问,那么文件会被cache manager进程删除掉 #max_size=10g 表示这个zone的硬盘容量为10GB proxy_temp_path /var/fdfs_cache/tmp; proxy_cache_path /var/fdfs_cache levels=1:2 keys_zone=fdfscache:100m inactive=1d max_size=10g; upstream fdfs_group1 { server 192.168.56.103:8888 weight=1 max_fails=2 fail_timeout=30s; server 192.168.56.102:8888 weight=1 max_fails=2 fail_timeout=30s; } server { listen 80; server_name 192.168.56.101; location ~/purge(/.*) { allow 127.0.0.1; allow 192.168.56.0/24; #deny all; allow all; proxy_cache_key $uri$is_args$args; proxy_cache_purge fdfscache $1$is_args$args;; add_header Nginx-Cache "$upstream_cache_status"; } location /group2/M00 { root /opt/fastdfs/data; ngx_fastdfs_module; } location /group1/M00 { proxy_next_upstream http_502 http_504 error timeout invalid_header; #设置资源缓存的zone proxy_cache fdfscache; #设置缓存的key proxy_cache_valid 200 304 12h; proxy_cache_key $uri$is_args$args; proxy_pass http://fdfs_group1; expires 30d; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; #location = /50x.html { # root html; #} # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }
2.fdfs-ngix-module配置
# connect timeout in seconds # default value is 30s connect_timeout=2 # network recv and send timeout in seconds # default value is 30s network_timeout=30 # the base path to store log files base_path=/tmp # if load FastDFS parameters from tracker server # since V1.12 # default value is false load_fdfs_parameters_from_tracker=true # storage sync file max delay seconds # same as tracker.conf # valid only when load_fdfs_parameters_from_tracker is false # since V1.12 # default value is 86400 seconds (one day) storage_sync_file_max_delay = 86400 # if use storage ID instead of IP address # same as tracker.conf # valid only when load_fdfs_parameters_from_tracker is false # default value is false # since V1.13 use_storage_id = false # specify storage ids filename, can use relative or absolute path # same as tracker.conf # valid only when load_fdfs_parameters_from_tracker is false # since V1.13 storage_ids_filename = storage_ids.conf # FastDFS tracker_server can ocur more than once, and tracker_server format is # "host:port", host can be hostname or ip address # valid only when load_fdfs_parameters_from_tracker is true tracker_server=192.168.56.101:22122 #tracker_server=192.168.56.102:22122 # the port of the local storage server # the default value is 23000 storage_server_port=23000 # the group name of the local storage server group_name=group1 # if the url / uri including the group name # set to false when uri like /M00/00/00/xxx # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx # default value is false url_have_group_name = true # path(disk or mount point) count, default value is 1 # must same as storage.conf store_path_count=1 # store_path#, based 0, if store_path0 not exists, it's value is base_path # the paths must be exist # must same as storage.conf store_path0=/opt/fastdfs #store_path1=/home/yuqing/fastdfs1 # standard log level as syslog, case insensitive, value list: ### emerg for emergency ### alert ### crit for critical ### error ### warn for warning ### notice ### info ### debug log_level=info # set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.log # empty for output to stderr (apache and nginx error_log file) log_filename= # response mode when the file not exist in the local file system ## proxy: get the content from other storage server, then send to client ## redirect: redirect to the original storage server (HTTP Header is Location) response_mode=proxy # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a # multi aliases split by comma. empty value means auto set by OS type # this paramter used to get all ip address of the local host # default values is empty if_alias_prefix= # if need find content type from file extension name # should set to false in apache server because it done by apache # should set to true in nginx server http.need_find_content_type=false # use "#include" directive to include HTTP config file # NOTE: #include is an include directive, do NOT remove the # before include #include http.conf # if support flv # default value is false # since v1.15 flv_support = true # flv file extension name # default value is flv # since v1.15 flv_extension = flv # set the group count # set to none zero to support multi-group # set to 0 for single group only # groups settings section as [group1], [group2], ..., [groupN] # default value is 0 # since v1.14 group_count = 2 # group settings for group #1 # since v1.14 # when support multi-group, uncomment following section [group1] group_name=group1 storage_server_port=23000 store_path_count=0 store_path0=/opt/fastdfs #store_path1=/home/yuqing/fastdfs1 # group settings for group #2 # since v1.14 # when support multi-group, uncomment following section as neccessary [group2] group_name=group2 storage_server_port=23000 store_path_count=0 store_path0=/opt/fastdfs #store_path1=/home/yuqing/fastdfs1
相关推荐
Fastdfs单节点安装包集合(Fastdfs+libfastcommon+fastdfs-nginx-module+nginx)
FastDFS+Nginx+libfastcommon+fastdfs-nginx-module安装所需所有中间件
Fastdfs单节点安装包集合资源(Fastdfs+libfastcommon+fastdfs-nginx-module+nginx)
nginx-1.12.2+fastDFS-v5.05+libfastcommonv1.0.7+fastdfs-nginx-module-v1.16
fastdfs的安装手册说明+配置文件+fastdfs安装包+nginx安装包,压缩包内是自己结合网上资料整理的fastdfs的全套配置及说明,已成功安装并运行
(注意注意,里面有个文件libfastcommon_v1.01.tar.gz不太好用,大家可以去这个地址 http://download.csdn.net/download/simuhunluo/10114036 单独下载一个可用的1.07版本)(在这里上传... ngx_cache_purge-2.3.tar.gz
FastDFS_v5.05+fastdfs-nginx-module_v1.16+libfastcommonV1.0.7安装包及其依赖包
FastDFS分布式文件服务器搭建所需资源包:libfastcommon-master+fastdfs-nginx-module-master+fastdfs-master+nginx,搭建教程请见https://blog.csdn.net/Jeman_Yao/article/details/109102893
资源内容包含:fastdfs-6.06,fastdfs-nginx-module-1.22,nginx-1.16.1,libfastcommon-1.0.43,兼容完全没问题,属于是拿来即用。
最新版linux fastdfs-nginx-module-1.22.tar.gz
fastdfs 与nginx集成包
此安装包将安装fastdfs与fastdfs-moduel所需资源整合,下载解压即可使用,无需再去分别下载
解决 Maven 无法下载 fastdfs-client-java-1.29-SNAPSHOT 依赖,直接下载之后用maven命令存储到本地maven仓库即可。 maven命令 mvn install:install-file -DgroupId=org.csource -DartifactId=fastdfs-client-java ...
亲测可用,一定要对应版本
4个源码文件,fastdfs-master.zip+fastdfs-nginx-module-master.zip+libfastcommon-master.zip+nginx-1.8.0.tar.gz
赠送jar包:fastdfs-client-1.27.2.jar; 赠送原API文档:fastdfs-client-1.27.2-javadoc.jar; 赠送源代码:fastdfs-client-1.27.2-sources.jar; 赠送Maven依赖信息文件:fastdfs-client-1.27.2.pom; 包含翻译后...
fastdfs-5.05.tar.gz : FastDFS安装主文件包 libfastcommon-master.zip: FastDFS文件系统依赖包 nginx-1.8.1.tar.gz:nginx安装包 fastdfs-nginx-module_v1.16.tar.gz: nginx下...ngx_cache_purge-2.1.tar.gz:缓存
fastdfs-client-java-1.27-RELEASE 版本 很实用 spring boot整合fastdfs
fastdfs-nginx-module-master 5.0.8 适用 安装时如果fastdfs-nginx-module-master 5.0.8不适用会安装不了