Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile and install some common parameters of Nginx

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to compile and install some common parameters of Nginx". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "how to compile and install some common parameters of Nginx"!

Preparation before installation

Prepare the pre-compilation environment plug-in Ubuntu: apt-get install libpcre3 libpcre3-dev apt-get install libssl-dev apt-get install openssl should also install GD library apt-get install libgd2-xpm-dev if you want to support image filter. This is the preparation of Ubuntu. If CentOS is even more deadly, there is also a part of centos notes. First, add the yum source and then: yum-y install gcc yum-y install gcc-c++ yum-y install make yum-y install pcre-devel download the curl-O # http://nginx.org/download/nginx-1.12.1.tar.gz extract file: tar-zxvf. / nginx-1.12.1.tar.gz

Start compilation

The first step of compilation. / configure--prefix= specifies the installation directory-the path to the error-log-path= error log defaults prefix/logs/error.log--http-log-path= settings the path to the http access log defaults prefix/logs/access.log--sbin-path= settings the location of the nginx execution script defaults prefix/sbin/nginx--conf-path= configuration the path to the nginx configuration file defaults prefix/conf/nginx.conf- -pid-path= process runs ID storage path default pidfile location is prefix/logs/nginx.pid--user= setting default start process user default nobody--group= setting this user group default nobody--with-http_ssl_module enables SSL support and can handle HTTPS requests (requires OpenSSL In Debian systems, the corresponding package is libssl-dev.) -- with-http_image_filter_module for image clipping (the system also needs to install GD library support)-- with-stream module for forwarding socket-- with-mail mail server extension-- with-debug debug logs are different from error log. Make & & make install compilation summary: actually, for me, when I compile Generally speaking, as long as. / configure-- prefix= path-- with-steam specifies the installation path of Nginx, and loads the required modules, such as-- with-stream (the module used to forward socket), others such as: log, run file, configuration file path. And so on, the default is in the Nginx installation directory, itself is excellent. I don't think there is any need to gild the lily. At most, after Nginx is installed, you can re-specify the path to access the log and the running user in the configuration file. At this point, I believe you have a deeper understanding of "how to compile and install some common parameters of Nginx". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report