???????
????Nginx ("engine x") ????????????HTTP?????????????????????IMAP/POP3/SMTP???????????
??????????????????Web?????????????????????????????????????????????????????Apache????????????
??????????????Nginx???Web??????????????Apache???????????
???????????????Nginx?????????????????????
??????????
??????????????????????????I/O?????????????????
??????????????????????epoll???????????????????
????master/worker???????master????????????????worker?????
???????????

????Nginx????????????
????I/O???????????????????????????????????????????????????????epoll?????
????Nginx??Apache?????????????????
????????Apache???????????????????????????????????????????????????????????????????ü??????????????????????л??????CPU????????????????????????????????????
????????Nginx?????worker??????????????????????????????????????????????????????????????????????????
????????????
???????

 

yum -y groupinstall “Development tools”
yum -y groupinstall “Server Platform Development”
yum install gcc openssl-devel pcre-devel zlib-devel
groupadd -r nginx
useradd -r -g nginx -s /sbin/nologin -M nginx
tar xf nginx-1.4.7.tar.gz
cd nginx-1.4.7
mkdir -pv /var/tmp/nginx
./configure
--prefix=/usr
--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/nginx.pid  
--lock-path=/var/lock/nginx.lock
--user=nginx
--group=nginx
--with-http_ssl_module
--with-http_flv_module
--with-http_stub_status_module
--with-http_gzip_static_module
--http-client-body-temp-path=/var/tmp/nginx/client/
--http-proxy-temp-path=/var/tmp/nginx/proxy/
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
--http-scgi-temp-path=/var/tmp/nginx/scgi
--with-pcre
make && make install