nginx编译

时间:2021-08-23 23:37:32

先下载openssl、pcre、zlib安装;然后找个上传模块nginx-upload-module-2.2添加到nginx上。

root@liuhan888:~# mkdir nginx
root@liuhan888:~# ls
2.2.zip  nginx-1.10.1          nginx-upload-module-2.2  openssl-1.0.1t.tar.gz  pcre-8.39.tar.gz    zlib-1.2.8.tar.gz
nginx     nginx-1.10.1.tar.gz  openssl-1.0.1t           pcre-8.39          zlib-1.2.8

root@liuhan888:~# cd nginx-1.10.1
root@liuhan888:~/nginx-1.10.1# pwd
/root/nginx-1.10.1

./configure --prefix=/root/nginx --add-module=/root/nginx-upload-module-2.2 --with-openssl=/usr/local/ssl/
make
make install

-------------------------------------
make会报错,添加红框内的宏就好了。

nginx编译
-------------------------------------------------
nginx编译