使用apt-get install nginx后重新编译nginx [英] Recompiling nginx after using apt-get install nginx

查看:305
本文介绍了使用apt-get install nginx后重新编译nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最初是通过apt-get install安装nginx的.它工作正常.现在,我想安装一些第三方模块,并且我必须重新编译nginx.所以我试图重新编译.经过了动议,然后我意识到我的原始版本仍然是正在使用的版本.

I originally installed nginx via apt-get install. It works just fine. Now, I want to install some 3rd party modules and I have to recompile nginx. So I tried to recompile. It went through the motions and then I realized that my original version was still the one that was being used.

我是否需要先卸载我的nginx原始副本,以便其他人正确安装?

Do I need to uninstall my original copy of nginx first in order for the other to install properly?

我的安装标志: --conf-path =/etc/nginx/nginx.conf --error-log-path =/var/log/nginx/error.log --pid-path =/var/run/nginx.pid --lock- path =/var/lock/nginx.lock --http-log-path =/var/log/nginx/access.log --http-client-body-temp-path =/var/lib/nginx/body- http-proxy-temp-path =/var/lib/nginx/proxy --http-fastcgi-temp-path =/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module- -with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module =/usr/src/gnosek-nginx-upstream -fair-5f6a3b7 --add-module =/usr/src/mod_strip

my flags for the install: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/usr/src/gnosek-nginx-upstream-fair-5f6a3b7 --add-module=/usr/src/mod_strip

推荐答案

您不需要先卸载apt-get版本,但这是一个好主意,这样您就不会在无意间使用自定义重新编译程序了.将来会进行"apt-get更新"或类似的系统更新.

You shouldn't need to uninstall the apt-get version first, but it's a good idea so that you don't inadvertantly walk over your custom recompile with an 'apt-get update' or similar system update in the future.

有几个原因可能导致您的重新编译无法正常进行.安装程序是否具有覆盖现有文件的正确权限? .configure是否将已编译的二进制文件与apt-get放在同一位置? (--sbin-path =/如果您想将它安装在.configure上,如果不是/sbin/nginx,则在重新编译时nginx是否正在运行?安装程序可能无法覆盖打开的文件. (您已经重新启动了nginx,对吗?)也许还有其他事情,但这就是我开始寻找的地方.

There are a few reasons your recompile may not have worked. Does the installer have the correct permissions to overwrite the existing file? Is .configure placing the compiled binary in the same place as apt-get? (--sbin-path=/where-you-want-it-installed on .configure, if not /sbin/nginx) Was nginx running when you recompiled? The installer may not be able to overwrite an open file. (You have restarted nginx, right?) Maybe something else, but that's where I'd start looking.

这篇关于使用apt-get install nginx后重新编译nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆