Ubuntu 13.04安裝最新版本的Nginx

來源:互聯網
上載者:User

Ubuntu 13.04安裝最新版本的Nginx 1.添加key[plain] wget http://nginx.org/keys/nginx_signing.key  apt-key add nginx_signing.key   2.建立/etc/apt/sources.list.d/nginx.list檔案,內容如下:[html] deb http://nginx.org/packages/mainline/ubuntu/ raring nginx  deb-src http://nginx.org/packages/mainline/ubuntu/ raring nginx   3.更新及安裝:[plain] apt-get update  apt-get install nginx   4.檢查一下版本[plain] nginx -v  nginx version: nginx/1.5.0   5. 命令列前面的安裝在/etc/init.d/目錄下建立了nginx指令碼,該指令碼支援幾個命令參數:[plain] echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload|upgrade|configtest}" >&2   非常好用。比如測試組態的參數:[plain] service nginx configtest  nginx: the configuration file /etc/nginx/nginx.conf syntax is ok  nginx: configuration file /etc/nginx/nginx.conf test is successful   6. 進程id官方文檔說:http://nginx.org/en/docs/control.html進程id檔案預設在[plain] /usr/local/nginx/logs/nginx.pid   但實際上在nginx指令檔中將其放在了[plain] /var/run/nginx.pid   7. 編譯選項,用-V可以查看編譯nginx程式編譯時間的選項:[plain]  nginx -V  nginx version: nginx/1.5.0  built by gcc 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)   TLS SNI support enabled  configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --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.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_spdy_module --with-ipv6   基本夠用,如果要開啟debug日誌的話,此版本沒有。需要自己編譯Nginx,並使用下面的參數:--with-debug
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.