下载
- http://nginx.org/en/download.html 下载页面
- wget http://nginx.org/download/nginx-1.14.2.tar.gz
安装依赖
apt-get install build-essential
apt-get install libtool
apt-get install libpcre3 libpcre3-dev
apt-get install zlib1g-dev
apt-get install openssl
apt-get install libssl-dev
安装
–with-http_ssl_module主要是配置https时用到,不加上这个参数的话到时启动https会找不到ssl模块
./configure --prefix=/usr/local/nginx --with-http_ssl_module
make
make install