1、下载nginx(linux版本)
下载地址见:http://nginx.org/download/
2、安装nginx编译环境
# yum -y install gcc-c++
# yum -y install pcre-devel openssl openssl-devel
3、配置nginx安装信息
进入nginx安装目录后,执行以下语句:
# ./configure --prefix=/home/gaochao/nginx --with-http_ssl_module
注:--prefix 参数:指定安装目录;--with-http_ssl_module:编译的时候启用SSL支持
4、编译、安装
# make
# make install
至此,nginx就安装在/home/gc/nginx这个位置了,可以作为绿色版本使用