-1

I am trying to install nginx from source. After make install, I had a look at /var/run/ folder but I cant find the nginx.pid file and nginx.lock files there. This is my configuration:

sudo ./configure --add-module=/opt/nginx-compile/modules/ngx_pagespeed-release-1.9.32.1-beta \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-mail \
--with-mail_ssl_module \
--with-file-aio \
--with-ipv6 \
--with-http_spdy_module \
--with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' \
--user=nginx \
--group=nginx

sudo make
sudo make install

After the above command, shouldnt there be a new nginx.pid and nginx.lock file created in /var/run/? I dont see them there.

This is the confirmation I see after make install:

make -f objs/Makefile install
make[1]: Entering directory `/opt/nginx-compile/nginx-1.6.1'
test -d '/etc/nginx' || mkdir -p '/etc/nginx'
test -d '/usr/sbin'             || mkdir -p '/usr/sbin'
test ! -f '/usr/sbin/nginx'             || mv '/usr/sbin/nginx'                         '/usr/sbin/nginx.old'
cp objs/nginx '/usr/sbin/nginx'
test -d '/etc/nginx'            || mkdir -p '/etc/nginx'
cp conf/koi-win '/etc/nginx'
cp conf/koi-utf '/etc/nginx'
cp conf/win-utf '/etc/nginx'
test -f '/etc/nginx/mime.types'                 || cp conf/mime.types '/etc/nginx'
cp conf/mime.types '/etc/nginx/mime.types.default'
test -f '/etc/nginx/fastcgi_params'             || cp conf/fastcgi_params '/etc/nginx'
cp conf/fastcgi_params          '/etc/nginx/fastcgi_params.default'
test -f '/etc/nginx/fastcgi.conf'               || cp conf/fastcgi.conf '/etc/nginx'
cp conf/fastcgi.conf '/etc/nginx/fastcgi.conf.default'
test -f '/etc/nginx/uwsgi_params'               || cp conf/uwsgi_params '/etc/nginx'
cp conf/uwsgi_params            '/etc/nginx/uwsgi_params.default'
test -f '/etc/nginx/scgi_params'                || cp conf/scgi_params '/etc/nginx'
cp conf/scgi_params             '/etc/nginx/scgi_params.default'
test -f '/etc/nginx/nginx.conf'                 || cp conf/nginx.conf '/etc/nginx/nginx.conf'
cp conf/nginx.conf '/etc/nginx/nginx.conf.default'
test -d '/var/run'              || mkdir -p '/var/run'
test -d '/var/log/nginx' ||             mkdir -p '/var/log/nginx'
test -d '/etc/nginx/html'               || cp -R html '/etc/nginx'
test -d '/var/log/nginx' ||             mkdir -p '/var/log/nginx'
make[1]: Leaving directory `/opt/nginx-compile/nginx-1.6.1'
Neel
  • 1,421
  • 7
  • 21
  • 35
  • The problem is that files are not created during the installation or during the execution of nginx? – ThoriumBR Oct 13 '14 at 20:43
  • The files are not created after installation. I thought these 2 files will be created after I run `make install`. Have I mistaken? – Neel Oct 13 '14 at 20:46
  • 2
    Yes, you are mistaken. Those files will be create by nginx when you start it. There's no point on having a lock and pid files for an application that is not running. – ThoriumBR Oct 13 '14 at 20:49

1 Answers1

1

Typically a pid or lock file is created upon start up of an application and not just by building the application.

As you can see from the make install output, that only determines that the base directory /var/run is there.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • aha.. so I've misunderstood it then. I thought these 2 files will be created after `make install`. It make sense now. – Neel Oct 13 '14 at 20:49