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

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