码迷,mamicode.com
首页 > 其他好文 > 详细

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

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

标签:logs   输入   com   sof   roo   order   过程   err   nginx   

一、安装

获取安装包:

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 安装过程中遇到的一些问题及解决方法

标签:logs   输入   com   sof   roo   order   过程   err   nginx   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!