2019-09-30 install niginx start close to compile and install nginx restart it requires the PCRE library

The first step is to download the installation package to extract nginx

checking for C compiler ... not found

The above problem is because of the lack of these packages

  1. yum -y install gcc
  2.  yum -y install gcc-c++ 
  3. yum install make

Compile and install nginx but requires the PCRE library

Compile and install nginx needs pcre package, not installed will have the following tips:

./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.

Pcre need to install the devel package, pcre-devel. Using yum also be installed with the following command :( ssl, zlib the like mounted reliance)

yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel

 Close nginx directly kill process ID

[Root @ Kaiwen ~] # ps -ef | grep nginx

root 28227 1 0 15:12 ? 00:00:00 nginx: master process ./nginx
nobody 28228 28227 0 15:12 ? 00:00:00 nginx: worker process
root 29225 16204 0 15:31 pts/0 00:00:00 grep --color=auto nginx

[root@kaiwen ~]# ps -ef | grep nginx

[root@kaiwen ~]# kill -quit 28227
[root@kaiwen ~]# ps -ef | grep nginx
root 29546 16204 0 15:38 pts/0 00:00:00 grep --color=auto nginx

 

 

 

 





Compile and install nginx needs pcre package, not installed will have the following tips:

./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.

Pcre need to install the devel package, pcre-devel. Using yum also be installed with the following command :( ssl, zlib the like mounted reliance)

yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel

 Close nginx directly kill process ID

[Root @ Kaiwen ~] # ps -ef | grep nginx

root 28227 1 0 15:12 ? 00:00:00 nginx: master process ./nginx
nobody 28228 28227 0 15:12 ? 00:00:00 nginx: worker process
root 29225 16204 0 15:31 pts/0 00:00:00 grep --color=auto nginx

[root@kaiwen ~]# ps -ef | grep nginx

[root@kaiwen ~]# kill -quit 28227
[root@kaiwen ~]# ps -ef | grep nginx
root 29546 16204 0 15:38 pts/0 00:00:00 grep --color=auto nginx

 

 

 

 





Guess you like

Origin www.cnblogs.com/wbly2019/p/11612934.html