centos7 源码安装nginx

下载ngxin 最新版本  nginx 官方网站 http://nginx.org/en/download.html

解压 tar -zxvf nginx-1.14.0.tar.gz 

进入解压目录,执行:  

./configrue

如果报错

checking for C compiler ... not found

安装gcc

yum install gcc

然后重复执行  ./configrue

参考https://blog.csdn.net/hejun1218/article/details/72473218

如果报错 

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

安装pcre-devel解决问题
yum -y install pcre-devel

报错

 

./configure: error: SSL modules require the OpenSSL library.

安装  yum -y install openssl openssl-devel  

然后执行:

 make  &&  make install

执行nginx命令报错   [emerg]: getpwnam(“nginx”) failed

参考:https://www.cnblogs.com/love3556/p/5962388.html

启动nginx  报错 

nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory)

手动创建  文件夹  mkdir  /var/cache/nginx/client_temp

再次启动 ok

 

转载于:https://my.oschina.net/mahuilong/blog/1786129

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值