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這個位置了,可以作爲綠色版本使用