1、使用rpm -qa | grep gcc确认是否安装gcc,如果未安装则先安装gcc
yum install gcc-c++
2、安装nginx依赖的模块
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
3、进入安装目录,从网络下载nginx安装包
wget http://nginx.org/download/nginx-1.8.0.tar.gz
下载nginx_upstream_check_module模块实现健康检查
wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master
tar -xzvf nginx-1.8.0.tar.gz
unzip master
mv nginx-1.8.0 /usr/local/nginx
健康检查
mv nginx_upstream_check_module-master /usr/local/
cd /usr/local/nginx
为nginx打补丁
patch -p1 < ../nginx_upstream_check_module-master/check_1.5.12+.patch
5、检测依赖环境及配置,设置安装目录参数,设置依赖模
./config