安装Nginx时报错 ./configure: error: the HTTP rewrite module requires the PCRE library. 安装pcre-devel解决问题 错误提示:./configure: error: the HTTP cache module requires md5 functions 解决办法: yum -y install openssl openssl-devel
----------------------------------------------------------------------------------------------------------------------- 下面的配置文件:
|
nginx安装配置
最新推荐文章于 2021-12-31 21:08:38 发布
nginx安装配置
最近部署项目用到了nginx,下面安装过程以及安装过程遇到的问题和解决方法
1.安装支持正则的pcre模块
shell:
tar zxvf pcre-8.02.tar.gz
cd pcre-8.02
./configure
make
make install
2.安装 gcc-c++(如果不存在)
yum install gcc-c++
3.安装nginx
shell:
tar zxvf nginx-0.8.54.tar.gz
cd t
ar zxvf
nginx-0.8.54
./configure --with-http_stub_status_module --with-http_gzip_static_module --prefix=/opt/nginx
make
make install
ps: --prefix=/opt/nginx安装路径 --with-http_gzip_static_module传输压缩模块 --with-http_stub_status_module监控当前状态模块
ps:
CPU相关:
#user nobody;
#worker_processes 4;
进程位置
pid logs/nginx.pid;
4.启动&停止
/opt/nginx/sbin/nginx -V #查看编译选项,安装模块
/opt/nginx/sbin/nginx -t #查看配置文件是否正确
/opt/nginx/sbin/nginx -t -c /opt/nginx/conf/nginx.conf #指定配置文件是否正确
/opt/nginx/sbin/nginx #启动
ps -ef|grep nginx #查看pid
kill -XXX pid
-XXX : QUIT:请求处理完成后关闭进程
HUP:平滑重启
USR1,USR2
ps:其它关闭方法 /opt/nginx/sbin/nginx -s stop # 详细 -h帮助
//问题集:
安装Nginx时报错 the HTTP cache module requires md5 functions
2011-09-25 13:20