tar -zxvf nginx-1.10.3.tar.gz
cd ./nginx-1.10.3
./configure --prefix=/usr/local/nginx-1.10.3 --with-pcre=/usr/local/pcre-8.40 --with-zlib=/usr/local/zlib-1.2.11
make
make install
报错:
[root@localhost nginx-1.10.3]# make
make -f objs/Makefile
make[1]: Entering directory `/root/Desktop/salamander-lnmp/nginx-1.10.3'
cd /usr/local/pcre-8.40 \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre-8.40/Makefile] Error 127
make[1]: Leaving directory `/root/Desktop/salamander-lnmp/nginx-1.10.3'
make: *** [build] Error 2
自己解决了:
--with-pcre= --with-zlib 指的是源码路径