手工安装nginx make出错

2018-07-11 10:10:09 出处:软件园 作者:动力软件园 责任编辑:honhole

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 没有关


广告
广告
热门软件
3333
() ()
相关文章
相关软件