1. 环境
OS: Debian 6.0.7 amd64
Linux Kernel: 3.2.0-0.bpo.4-amd64
Debian源: deb http://ftp.debian.org/debian squeeze main contrib non-free
2. 安装
(1) 安装依赖包
# aptitude install make gcc libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
(2) 创建目录并下载nginx-1.2.9.tar.gz
# mkdir /data
nginx-1.2.9.tar.gz下载地址:http://nginx.org/en/download.html
(3) 解压并安装
# cd /data
# tar zxvf nginx-1.2.9.tar.gz
# /data/nginx-1.2.9/configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module
# make && make install
(4) 启动nginx
# /usr/local/nginx/sbin/nginx
(5) 访问如下url检测nginx是否成功启动
访问 http://(服务器ip地址或localhost)/ ,若看到“Welcome to nginx!”即安装成功
3. 配置(待续...)