1,首先解决系统环境:nginx
安装rpm包组{CentOS6 跟开发相关的包组:}正则表达式
a. Development Tools shell
#yum groupinstall "Development Tools"后端
b. Server Platform Development性能优化
#yum groupinstall "Server Platform Development"服务器
c. Desktop Platform Development并发
#yum groupinstall "Desktop Platform Development"负载均衡
yum
install
-y gcc pcre pcre-devel openssl openssl-devel gd gd-devel perl perl-ExtUtils-Embed
memcached
2,解决nginx源码工具
官方网站下载地址:http://nginx.org/download/
3,。安装
./configure --prefix=/usr/local/nginx --with-pcre --user=daemon --group=daemon --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
make
make install
2、Nginx编译选项
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
一、默认自动编译项 禁用选项
Core:Nginx核心功能, --without-http
Access:基于IP的访问控制 --without-http_access_module
Auth Basic:HTTP用户认证模块 --without-http_auth_basic_module
Auto Index:自动目录索引 --without-http_autoindex_module
Browser:描述用户代理 --without-http_charset_module
Charset:从新编码网页 --without-http_charset_module
Empty GIF:内存中存放一个图片 --without-http_empty_gif_module
FastCGI:FastCGI支持 --without-http_fastcgi_module
Geo:支持IP变量设置 --without-http_geo_module
Gzip:Gzip压缩 --without-http_gzip_module
Limit Requests:限制客户端链接频率 --without-http_limit_req_module
Limit Conn:挥发的并发链接 --without-http_limit_conn_module
Map:设置变量 --without-http_map_module
Memcached:Memcache支持 --without-http_memcached_module
Referer:基于Referer头部信息过滤 --without-http_referer_module
Rewrite:使用正则表达式重写请求 --without-http_rewrite_module
SCGI:支持SCGI协议 --without-http_scgi_module
Upstream:负载均衡 --without-http_upstream_ip_hash_module
Headers:设置http响应的头部信息
Index:首页
Log:自定义日志
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
二、内置模块中的附加模块,须要在编译时手动开启 开启选项
Embedded Perl:支持Perl --with-http_perl_module
FLV:支持Flash视频 --with-http_flv_module
GeoIP:经过IP变量实现负载均衡 --with-http_geoip_module
Google Perftools:支持谷歌的性能优化工具 --with-google_perftools_module
Gzip Precompression:压缩静态文件 --with-http_gzip_static_module
Image Filter:转换图形的过滤器 --with-http_image_filter_module
MP4:支持MP4 --with-http_mp4_module
Real IP:使用Nginx做为后端服务器 --with-http_realip_module
Secure Link:使用密匙保护页面 --with-http_secure_link_module
SSL:支持HTTPS
/SSL
--with-http_ssl_module
Stub Status:查看服务器状态 --with-http_stub_status_module
WebDAV:支持WebDAV --with-http_dav_module
------------------------------------------
Core:邮件代理功能 --with-mail
Core:邮件代理功能 --without-mail_pop3_module
Core:邮件代理功能 --without-mail_imap_module
Core:邮件代理功能 --without-mail_smtp_module
------------------------------------------
SSL:支持SSL
/TLS
加密邮件协议 --with-mail_ssl_module
|