Centos7 64位 之 Nginx-1.15.7 安装
一、nginx扮演了一个反向代理的服务器的角色。
是一种软负载,软件负载均衡是利用现有的技术结合主机硬件实现的一种消息队列分发机制。
二、官网下载nginx包
可以从这里找最新的:http://nginx.org/en/download.html
三、解压并进入对应目录下安装
tar -zxvf nginx-1.15.7.tar.gz --解压
# ./configure && make && make install --执行安装
四、安装过程错误解决
1.执行安装后提示:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
缺少PCRE包:
yum -y install pcre-devel
安装PCRE包后重新安装nginx
2.执行安装后提示:
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
缺少zlib包:
yum install -y zlib-devel
安装完成后重新安装nginx
安装成功!
浙公网安备 33010602011771号