linux源码编译

文件夹结构
nginx----->nginx(源码)
                   opensll(源码)
                   pcre(源码)
                   zlib   (源码)
 
在nginx(源码)编译:
./configure  --prefix=..  --with-pcre=../pcre --with-zlib=../zlib
--with-http_ssl_module  --with-openssl=../openssl   --with-http_stub_status_module
make
make install
 
 
--with-http_stub_status_module  :  将nginx的调试参数调试模块加入nginx中
使用相对路径时,需要使用-p参数指定前缀路径,否则需要使用完整路径
 
nginx的参数:
        -p  prefix : 设置前缀路径(默认是:/usr/local/nginx/)在自定义编译时,或者编译好nginx后,更换nginx文件夹路径时,使用该参数指定nginx的绝对路径
        -c  设置配置文件(默认是:/usr/local/nginx/conf/nginx.conf)
        -t   检测配置文件是否有语法错误,然后退出
        -s   给一个 nginx 主进程发送信号:stop(停止), quit(退出), reopen(重启), reload(重新加载配置文件)
        
如: 
        以下指令执行时,指定了nginx的运行路径 和配置文件路径,因此nginx无论在哪编译都问题不大
        /opt/JMKVCloud/nginx/sbin/nginx -p  /opt/JMKVCloud/nginx -c /opt/JMKVCloud/nginx/conf/nginx.conf  -s reload
 
posted @ 2020-12-19 21:41  dos_hello_world  阅读(149)  评论(0)    收藏  举报