centos7.5版本安装nginx.1.14.0时需要安装的依赖

这是我所使用的linux版本7.5的,建议大家在虚拟机中安装好linux之后快照备份一下

安装好系统后想要安装lnmp环境,先安装nginx

我下的nginx的tar包是nginx-1.14.0这个版本

参考朋友写的nginx源码安装文章安装nginx

https://note.youdao.com/share/?id=bc77cf83e654c73692d04d1f898b1058&type=notebook#/75D9748082D3465997E1EC2700F30621

发现缺少各种依赖

yum -y install gcc gcc-c++ autoconf automake make

yum -y install pcre-devel

yum -y install zlib-devel

之后编译

./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/config/nginx.conf --error-log-path=/usr/local/nginx/logs/error.log --pid-path=/usr/local/nginx/logs/nginx.pid --http-log-path=/usr/local/nginx/logs/access.log

显示如下界面成功

然后执行make && make install

猜你喜欢

转载自blog.csdn.net/qq_38802291/article/details/83656665
今日推荐