nginx - 使用 apt-get install nginx 后重新编译 nginx

标签 nginx installation apt-get

我最初是通过 apt-get install 安装 nginx。它工作得很好。现在,我想安装一些 3rd 方模块,我必须重新编译 nginx。所以我尝试重新编译。它经历了这些 Action ,然后我意识到我的原始版本仍然是正在使用的版本。

我是否需要先卸载我的 nginx 原始副本才能正确安装另一个?

我的安装标志:
--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 update”或类似的系统更新来检查您的自定义重新编译。

您的重新编译可能无法正常工作有几个原因。安装程序是否具有覆盖现有文件的正确权限? .configure 是否将编译后的二进制文件放在与 apt-get 相同的位置? (--sbin-path=/where-you-want-it-installed on .configure, if not/sbin/nginx) 重新编译时 nginx 是否正在运行?安装程序可能无法覆盖打开的文件。 (你已经重新启动了 nginx,对吗?)也许还有别的东西,但这就是我开始寻找的地方。

关于nginx - 使用 apt-get install nginx 后重新编译 nginx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9537426/

相关文章:

nginx - 如何将所有请求重定向到 nginx 中的同一个文件?

php - Cloudflare 将子域重定向到目录

Android 通过包名获取安装位置

ubuntu - apt-get update, dist-upgrade, autoremove, autoclean 在单个 sudo 命令中

linux - apt-get 没有安装任何 linux 服务器

installation - 如何更改 apt-get 安装目录

asp.net - 安装(和部署)Mono ASP.Net 到 Redhat

ssl - 为什么 nginx 选择它选择的 SSL 版本和密码?

python - 安装 theano

linux - 如何使用 bash 中的安装将目录复制到目录中?