首页 > 电脑教程 > Linux教程 > 手工安装nginx make出错

手工安装nginx make出错

小编:动力软件园 时间:2018-07-11 11:04:00

Configuration summary

  + using system PCRE library

  + OpenSSL library is not used

  + using system zlib library


  nginx path prefix: "/usr/local/nginx"

  nginx binary file: "/usr/local/nginx/sbin/nginx"

  nginx modules path: "/usr/local/nginx/modules"

  nginx configuration prefix: "/usr/local/nginx/conf"

  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"

  nginx pid file: "/usr/local/nginx/logs/nginx.pid"

  nginx error log file: "/usr/local/nginx/logs/error.log"

  nginx http access log file: "/usr/local/nginx/logs/access.log"

  nginx http client request body temporary files: "client_body_temp"

  nginx http proxy temporary files: "proxy_temp"

  nginx http fastcgi temporary files: "fastcgi_temp"

  nginx http uwsgi temporary files: "uwsgi_temp"

  nginx http scgi temporary files: "scgi_temp"


[0)W83IGS~WH(@Y]RT13PUV.png

make 出错了,忘记截图了,这是别的地方截图,不用介意

cd /home/src/zlib-1.2.11 
        && make distclean 
        && CFLAGS="-O2 -fomit-frame-pointer -pipe " CC="cc" 
                ./configure 
        && make libz.a
make[2]: Entering directory `/home/src/zlib-1.2.11'
rm -f *.o *.lo *~ 
           example minigzip examplesh minigzipsh 
           example64 minigzip64 
           infcover 
           libz.* foo.gz so_locations 
           _match.s maketree contrib/infback9/*.o



原因:需要手工下载zlib源码包,编译的时候指定源码包路径。


[root@localhost nginx-1.14.0]# ./configure --prefix=/usr/local/nginx --with-zlib=/home/src/zlib-1.2.11

重新编译结果:

        objs/ngx_modules.o

        -ldl -lrt -lpthread -lcrypt -lpcre /home/src/zlib-1.2.11/libz.a

        -Wl,-E

sed -e "s|%%PREFIX%%|/usr/local/nginx|"

                -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|"

                -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|"

                -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|"

                < man/nginx.8 > objs/nginx.8

make[1]: Leaving directory `/home/src/nginx-1.14.0'


[root@localhost nginx-1.14.0]# make install

就ok了。



源码编译的程序没有 start stop 等命令 源码编译的缺点。


/usr/local/nginx/sbin/nginx 启动


/usr/local/nginx/sbin/nginx -s reload 从载配置文件,就相当于重启



/usr/local/nginx/sbin/nginx 没有关


排行榜
易学车老版本

易学车老版本

实用工具 下载
天行健安卓版 v2.35770

天行健安卓版 v2.35770

手游软件 下载
三星PC套件 samsung kies 官方正式版 3.2.15041.2

三星PC套件 samsung kies 官方正式版 3.2.15041.2

手机工具 下载