欢迎来到梦飞科技

服务器租用

当前优惠活动:

办理error: the HTTP rewrite module requires the PCRE library.

系统为Centos 64位

第一步:从http://nginx.org/download/上下载相应的版本(可能wget http://nginx.org/download/nginx-1.5.9.tar.gz直接在Linux上用呼吁下载)

第二步:解压 tar -zxvf nginx-1.5.9.tar.gz 

第三步:配置一下设置信息 ./configure --prefix=/usr/local/nginx ,可能不执行此步,直接默认设置

第四步:

make 编译 (make的进程是把各类语言写的源码文件,酿成可执行文件和各类库文件)

make install 安装 (make install是把这些编译出来的可执行文件和库文件复制到符合的处所)

在设置信息的时候,也就是在第三步,呈现了一下错误:

治理error: the HTTP rewrite module requires the PCRE library.

错误为:./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel办理问题
yum -y install pcre-devel

尚有大概呈现:

错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library.   You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.

办理步伐:

yum -y install openssl openssl-devel

安装后在linux下启动和封锁nginx:

启动操纵

/usr/nginx/sbin/nginx (/usr/nginx/sbin/nginx -t 查察设置信息是否正确)

  遏制操纵
遏制操纵是通过向nginx历程发送信号(什么是信号请参阅linux文 章)来举办的
步调1:查询nginx主历程号
ps -ef | grep nginx
在历程列内外 面找master历程,它的编号就是主历程号了。
步调2:发送信号
从容遏制Nginx:
kill -QUIT 主历程号
快速遏制Nginx:
kill -TERM 主历程号
强制遏制Nginx:
pkill -9 nginx

别的, 若在nginx.conf设置了pid文件存放路径则该文件存放的就是Nginx主历程号,假如没指定则放在nginx的logs目次下。有了pid文 件,我们就不消先查询Nginx的主历程号,,而直接向Nginx发送信号了,呼吁如下:
kill -信号范例 '/usr/nginx/logs/nginx.pid'

滑腻重启
假如变动了设置就要重启Nginx,要先封锁Nginx再打开?不是的,可以向Nginx 发送信号,滑腻重启。
滑腻重启呼吁:
kill -HUP 住进称谓或历程号文件路径

可能利用

/usr/nginx/sbin/nginx -s reload

留意,修改了设置文件后最好先查抄一下修悔改的设置文件是否正 确,以免重启后Nginx呈现错误影响处事器不变运行。判定Nginx设置是否正确呼吁如下:
nginx -t -c /usr/nginx/conf/nginx.conf

可能

/usr/nginx/sbin/nginx -t

如下图:

治理error: the HTTP rewrite module requires the PCRE library.

梦飞科技 - 全球数据中心基础服务领先供应商

Copyright © 2003-2019 MFISP.COM. 国外服务器租用 IDC公司 版权所有 粤ICP备11019662号