1.安装gcc g++的依赖库

sudo apt-get install build-essential && sudo apt-get install libtool

2.安装pcre依赖库

sudo apt-get install libpcre3 libpcre3-dev

3.安装zlib依赖库

sudo apt-get install zlib1g-dev

4.安装ssl依赖库

sudo apt-get install openssl

5.解压安装nginx

tar -zxvf nginx-xxx.tar.gz
cd nginx-xxx
//配置指定安装路径和其他参数
./configure \
--prefix=/service/nginx \
--conf-path=/service/nginx/conf/nginx.conf \
--pid-path=/service/nginx/conf/nginx.pid \
--lock-path=/service/lock/nginx.lock \
--error-log-path=/service/log/nginx/error.log \
--http-log-path=/service/log/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/service/nginx/temp/client \
--http-proxy-temp-path=/service/nginx/temp/proxy \
--http-fastcgi-temp-path=/service/nginx/temp/fastcgi \
--http-uwsgi-temp-path=/service/nginx/temp/uwsgi \
--http-scgi-temp-path=/service/nginx/temp/scgi \
--with-http_stub_status_module
//编译与安装
make && make install

说点什么
支持Markdown语法
好耶,沙发还空着ヾ(≧▽≦*)o
Loading...