I'm using Nginx repository to make and make install Nginx from source on server. But in some articles they ran apt install nginx
at least!
My steps:
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar xzf /usr/src/nginx-${NGINX_VERSION}.tar.gz
And then:
cd /usr/src/nginx-${NGINX_VERSION} && \
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/bin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--add-module=/usr/src/nginx-modules/incubator-pagespeed-ngx-${NPS_VERSION}-stable \
--with-pcre \
--pid-path=/var/run/nginx.pid \
--with-http_ssl_module \
--user=nginx \
--group=nginx \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_v2_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-compat \
--with-http_slice_module \
--with-stream_ssl_module \
--modules-path=/usr/lib/nginx/modules
and run
make && make install
Define a user:
adduser --system --no-create-home --shell /bin/false --group --disabled-login nginx
Till now everything is perfect.
In my case before install the nginx from package manager my nginx version was 1.23.1 (stable version) and after install it from package manager apt install nginx
it goes (1.18)
- Why we need to install Nginx from package managers(like apt in this case) when we did it from source?
- How can I set some specific options when I use package manager to install the Nginx?