Linux源代码安装nginx教程,linux源代码nginx


源代码安装nginx,过程分两阶段

1.下载好nginx源代码

2.查看安装文档,根据自己的实际情况,确定安装的选项,通过命令行来安装

./configure --prefix=/usr/local/nginx/ --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/nginx/logs/error.log --http-log-path=/usr/local/nginx/logs/access.log --user=nginx --group=nginx --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.36/ --with-pcre-jit --with-zlib=/usr/local/src/zlib-1.0.11/

注意:其中的pcre和zlib不是你安装的给程序的地址,而是这个程序的源代码解压出来的所在地址

make && make install

相关内容