nginx源碼安裝

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-Embedmemcached

  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
相關文章
相關標籤/搜索