首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pid和Lock文件不是在Nginx自定义构建Centos 7中创建的

Pid和Lock文件不是在Nginx自定义构建Centos 7中创建的
EN

Server Fault用户
提问于 2014-10-13 20:28:50
回答 1查看 2.2K关注 0票数 -1

我正在尝试从源头安装nginx。在make install之后,我查看了/var/run/文件夹,但在那里找不到nginx.pid文件和nginx.lock文件。这是我的配置:

代码语言:javascript
复制
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

在上面的命令之后,不应该有一个新的nginx.pidnginx.lock文件在/var/run/中创建吗?我在那儿没看到他们。

这是我在make install之后看到的确认信息:

代码语言:javascript
复制
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'
EN

回答 1

Server Fault用户

回答已采纳

发布于 2014-10-13 20:47:29

通常,pid或锁文件是在应用程序启动时创建的,而不仅仅是通过构建应用程序。

正如您从make install输出中看到的那样,这只能确定基本目录/var/run在那里。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/636728

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档