简介:
暂时只对 CentOS 5.x/6.x/7.x 提供支持,推荐版本:Centos6.4/Centos7.2;
包含软件:
Nginx-Tengine-2.1.2,Nginx1.8 – 1.10,Apache2.4
PHP5.2 – 7.0(安装时可选,支持多版本共存,除php7.0都已包含zendloader)
MySQL5.5 – 5.7(安装时可选)
Pure-Ftpd
phpMyadmin
WEB在线面板
安装命令:
yum -y install screen wget && echo -e “defencoding utf-8\nencoding utf-8 utf-8” >> /etc/sc
reenrc && screen -S bt
wget -O install.sh http://125.88.182.172:5880/src/install.sh && sh install.sh
*适合全新的linux服务器使用,已经装有其他环境的Linux服务器请勿安装。
下载需要的文件: https://github.com/yaoweibin/ngx_http_substitutions_filter_module/
解压:unzip ngx_http_substitutions_filter_module-master.zip
cd /www/server/nginx/src
查看之前Nginx编译configure
nginx -V
重新编译Nginx
./configure –prefix= –user=www –group=www –prefix=/www/server/nginx –with-http_stub_status_module –with-http_ssl_module –with-http_v2_module –with-http_gzip_static_module –with-ipv6 –with-http_sub_module –with-http_flv_module –with-http_addition_module –with-http_realip_module –with-http_mp4_module –with-ld-opt=-Wl,-E –add-module=/www/server/ngx_http_substitutions_filter_module-master
make
/etc/init.d/nginx stop
cd objs/
cp nginx /www/server/nginx/sbin
/etc/init.d/nginx start
下面配置proxy_cache
cd /www/server/nginx/conf
vi nginx.conf
修改 /www/server/nginx/conf/nginx.conf 新增以下代码,主要是缓存相关设置,请放置于 http{ ##这里 } 中,一般加在 log_format 上面或下面均可:
client_body_buffer_size 512k;
proxy_connect_timeout 5;
proxy_read_timeout 60;
proxy_send_timeout 5;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
proxy_temp_path /www/server/nginx/proxy_temp;
proxy_cache_path /www/server/nginx/proxy_temp/path levels=1:2 keys_zone=cache_one:500m inactive=7d max_size=30g; #500m是内存占用,7d是7天无访问删除,30g是缓存占具硬盘空间
缓存目录没有的话,自行创建一个。
via。http://www.lsgzs.net/jsfx/7348.html