Ubuntu下源码安装Nginx

1、安装pcre

sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev

2、安装 openssl 

 sudo apt-get install openssl libssl-dev

3、安装nginx

下载地址:http://nginx.org/download/

解压:tar zxvf nginx-1.6.2.tar.gz

编译 

./configure \
  --prefix=/home/fattiger/nginx-1.6.2 \
  --sbin-path=/home/fattiger/nginx-1.6.2/nginx \
  --conf-path=/home/fattiger/nginx-1.6.2/nginx.conf \
  --pid-path=/home/fattiger/nginx-1.6.2/nginx.pid \
  --with-http_ssl_module


安装 

make -j `cat /proc/cpuinfo | grep processor| wc -l` && make install

你可能感兴趣的:(Ubuntu下源码安装Nginx)