Ubuntu13.04 install the latest Nginx version

Source: Internet
Author: User
For details about how to compile and install the SDK, refer to my other article: Compile. The following describes how to obtain the latest installation

For more information about how to compile and install, see my other article: http://www.linuxidc.com/Linux/2013-06/85330.htm

For how to use the default Nginx version of Ubuntu directly, see: http://www.linuxidc.com/Linux/2012-11/73449.htm

However, the Nginx version installed under Ubuntu13.04 by default is 1.2.x, which is too low.

The following describes how to obtain the latest installation package:

1. Add key

Wget http://nginx.org/keys/nginx_signing.key
Apt-key add nginx_signing.key

2. Create the/etc/apt/sources. list. d/nginx. list file with the following content:

Deb http://nginx.org/packages/mainline/ubuntu/ raring nginx
The deb-src http://nginx.org/packages/mainline/ubuntu/ raring nginx

3. Update and install:

Apt-get update
Apt-get install nginx

4. Check the version.

Nginx-v
Nginx version: nginx/1.5.0

5. Command Line

The nginx script is created in the/etc/init. d/directory. The script supports several command parameters:

Echo "Usage: $ SCRIPTNAME {start | stop | status | restart | reload | force-reload | upgrade | configtest}"> & 2

Very easy to use. For example, test the configuration parameters:

Service nginx configtest
Nginx: the configuration file/etc/nginx. conf syntax is OK
Nginx: configuration file/etc/nginx. conf test is successful

6. process id

Http://nginx.org/en/docs/control.html, according to official documents

The process id file is in

/Usr/local/nginx/logs/nginx. pid

However, in the nginx script file

/Var/run/nginx. pid

7. compile options. You can use-V to view the options for compiling the nginx program:

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. 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-mail -- with-mail_ssl_module -- with-file-aio -- with-http_spdy_module -- with-ipv6

It is basically enough. If you want to enable the debug log, this version does not exist. You need to compile Nginx and use the following parameters:

--with-debug

Reference official documents: http://nginx.org/en/docs/debugging_log.html

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.