linux环境下将nginx编译安装至指定目录步骤详解

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这个位置了,可以作为绿色版本使用

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章