6.3日音訊,Ubuntu安裝最new版本Ng。Nginx("enginex")是一個高性能的HTTP和反向代理服務(wù)器,也是一個IMAP/POP3/SMTP代理服務(wù)器。Nginx是由IgorSysoev為俄羅斯訪問量第二的Rambler.ru站點開發(fā)的,第一個公開版本0.1.0發(fā)布于2004年10月4日。其將源代碼以類BSD許可證的形式發(fā)布,因它的穩(wěn)定性、豐富的功能集、示例配置文件和低系統(tǒng)資源的消耗而聞名。2011年6月1日,nginx1.0.4發(fā)布。
1.添加key
[plain]
nginx_signing.key
apt-keyaddnginx_signing.key
2.創(chuàng)建/etc/apt/sources.list.d/nginx.list文件,內(nèi)容如下:
[html]
raringnginx
raringnginx
3.更新及安裝:
[plain]
apt-getupdate
apt-getinstallnginx
4.檢查一下版本
[plain]
nginx-v
nginxversion:nginx/1.5.0
5.命令行
前面的安裝在/etc/init.d/目錄下創(chuàng)建了nginx腳本,該腳本支持幾個命令參數(shù):
[plain]
echo"Usage:$SCRIPTNAME{start|stop|status|restart|reload|force-reload|upgrade|configtest}">&2
非常好用。比如測試配置的參數(shù):
[plain]
servicenginxconfigtest
nginx:theconfigurationfile/etc/nginx/nginx.confsyntaxisok
nginx:configurationfile/etc/nginx/nginx.conftestissuccessful
6.進程id
官方文檔說:control.html
進程id文件默認在
[plain]
/usr/local/nginx/logs/nginx.pid
但實際上在nginx腳本文件中將其放在了
[plain]
/var/run/nginx.pid
7.編譯選項,用-V可以查看編譯nginx程序編譯時的選項:
[plain]
nginx-V
nginxversion:nginx/1.5.0
builtbygcc4.7.3(Ubuntu/Linaro4.7.3-1ubuntu1)
TLSSNIsupportenabled
configurearguments:--prefix=/etc/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf--error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx.pid--lock-path=/var/run/nginx.lock--http-client-body-temp-path=/var/cache/nginx/client_temp--http-proxy-temp-path=/var/cache/nginx/proxy_temp--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp--http-scgi-temp-path=/var/cache/nginx/scgi_temp--user=nginx--group=nginx--with-http_ssl_module--with-http_realip_module--with-http_addition_module--with-http_sub_module--with-http_dav_module--with-http_flv_module--with-http_mp4_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_random_index_module--with-http_secure_link_module--with-http_stub_status_module--with-mail--with-mail_ssl_module--with-file-aio--with-http_spdy_module--with-ipv6
大體上來說nginx主要用于反向加速代理而不是像squid那樣做為常規(guī)代理服務(wù)器。Nginx的最大優(yōu)勢在于高負載情況下內(nèi)存和CPU的低消耗。我不認為squid能給你帶來比nginx更好的性能。
有沒有人能給出一個完整的.conf配置文件來詳細的解讀一下怎么配置和測試IMAP模塊,而不只是關(guān)于IMAP的只言片語啊?
依照[NginxImapProxyExample]開始你的配置.關(guān)于不同配置參數(shù)的具體信息,請查看[NginxMailCoreModule]頁。