Recompiling nginx after using apt-get install nginx

I originally installed nginx via apt-get install. It works great. Now I want to install some third-party modules, and I need to recompile nginx. So I tried to recompile. He went through the movements, and then I realized that my original version was still the one that was used.

Do I need to remove the original copy of nginx first so that the other is installed correctly?

my flags for installation: --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 / gxosek -upstream -fair-5f6a3b7 --add-module = / usr / src / mod_strip

+6
source share
1 answer

You do not need to uninstall the apt-get version first, but it is a good idea that in the future you do not accidentally step over your custom recompilation with the apt-get update or a similar system update.

There are several reasons why your recompilation 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 launched during recompilation? The installer may not be able to overwrite the open file. (You restarted nginx, right?) Maybe something else, but where I start to search.

+1
source

Source: https://habr.com/ru/post/909844/


All Articles