Nginx伺服器的安裝

來源:互聯網
上載者:User
Nginx伺服器的安裝

Nginx伺服器的安裝,我在這裡主要介紹兩種方式。

一、下載安裝包形式安裝

1)安裝包的下載地址:http://nginx.org/en/download.html 選擇linux版本進行下載

在當下,最新的安裝包版本為nginx-1.9.12.tar.gz 可點擊下載。

2)在安裝Nginx前,所依賴的其他條件,請自行安裝,這裡不再做詳細介紹。

(ps:我的虛擬機器當時配置的很全面,所以我也不知道需要啥,如果需要虛擬機器設定可私信我)
3)解壓縮nginx的源碼並安裝

# tar -zxvf nginx-1.3.16.tar.gz -C /usr/local/src/# cd /usr/local/src/nginx-1.3.16/# ./configure \--conf-path=/etc/nginx/nginx.conf \--error-log-path=/var/log/nginx/error.log \--http-log-path=/var/log/nginx/access.log \--pid-path=/var/run/nginx/nginx.pid \--lock-path=/var/lock/nginx.lock \--user=nginx \--group=nginx \--with-http_ssl_module \--with-http_flv_module \--with-http_stub_status_module \--with-http_gzip_static_module \--http-client-body-temp-path=/var/tmp/nginx/client/ \--http-proxy-temp-path=/var/tmp/nginx/proxy/ \--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \--with-pcre# make && make install# mkdir -p /var/tmp/nginx/client
4)驗證安裝效果

檢查是否安裝成功


啟動Nginx


驗證Nginx是否成功啟動


二、Ubuntu線上安裝

1)線上下載安裝

sudo apt-get install nginx
2)驗證安裝效果

同第一類第4項


以上就介紹了Nginx伺服器的安裝,包括了方面的內容,希望對PHP教程有興趣的朋友有所協助。

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.