首页 > 其他 > 详细

Nginx 安装过程中遇到的一些问题及解决方法

时间:2017-06-05 18:18:48      阅读:366      评论:0      收藏:0      [点我收藏+]

一、安装

获取安装包:

wget http://nginx.org/download/nginx-1.11.5.tar.gz

技术分享

解压安装包:

tar -zxvf nginx-1.11.5.tar.gz

技术分享

切换到 nginx-1.11.5 目录

技术分享

执行 ./configure

出现错误:

checking for C compiler ... not found

./configure: error: C compiler cc is not found

技术分享

原因:没有安装gcc

解决方法:使用root用户 执行 yum install gcc

技术分享

安装成功:

技术分享

再次执行 ./configure

出现错误:

./configure: error: the HTTP rewrite module requires the PCRE library.
技术分享

解决方法:

yum -y install pcre-devel

再次执行,出现错误

错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library

 解决方法:

yum -y install openssl openssl-devel

 

 然后再执行 make &&make install

技术分享

二、启动

nginx的启动目录在 /usr/local/nginx/sbin

直接进入该安装目录下,输入命令 ./nginx -t 即可启动

技术分享

也可以执行 ./nginx -s reload 进行重启

 

配置文件的修改 也需在/usr/local/nginx 目录下的conf中进行

技术分享

 

Nginx 安装过程中遇到的一些问题及解决方法

原文:http://www.cnblogs.com/Detector/p/6946388.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!