前言:
Nginx ("engine x") 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器。
Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,它已经在该站点运行超过三年了。
Igor 将源代码以类 BSD 许可证的形式发布。
Nginx 超越 Apache 的高性能和稳定性,使得国内使用 Nginx 作为 Web 服务器的网站也越来越多,其中
包括新浪博客、新浪播客、网易新闻、腾讯网、搜狐博客等门户网站频道,六间房、56.com 等视频分享
网站,Discuz!官方论坛、水木社区等知名论坛,盛大在线、金山逍遥网等网络游戏网站,豆瓣、人人网、
YUPOO 相册、金山爱词霸、迅雷在线等新兴 Web 2.0 网站。
本文简要介绍一下在 Debian 系统下部署 Nginx 的过程:
1. 安装 Nginx 的程序库,不需要太多包,只需要 pcre, ssl 和 zlib
aptitude install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev (虚拟机注意挂载系统光盘)
2. 编译安装 nginx-0.8.46.tar.gz (可以提前下载)
cd /data/packages/
ls
nginx-0.8.46.tar.gz
tar zxvf nginx-0.8.46.tar.gz
cd nginx-0.8.46
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --with-http_stub_status_module
最后会显示:
......
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1 library is not used
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/sbin"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
make && make install clean
评论1