nginx install nginx of the of 1 ttlsa tutorial series

  • 2020-05-07 20:52:36
  • OfStack

Today, nginx is gaining momentum. Remember that the 2011 version was only 1.0.6. Now it has been updated to 1.5.1. I wanted to record the nginx tutorial of series 1, but I didn't do it for various reasons. This year, I made time to finish the nginx used in my daily work. Of course, this article comes first, and the next article will cover the nginx virtual host configuration. Any Suggestions, please leave a message.

1. Prepare for necessary software

The & # 8226; Install pcre
To support rewrite, we need to install pcre

view sourceprint?
If you have already installed yum install pcre* // please skip this step
The & # 8226; Install openssl
ssl support is required. If ssl support is not required, skip this step


# yum install openssl* 

2, install nginx
executes the following command:


# ./configure --prefix=/usr/local/nginx-1.5.1 \  
--with-http_ssl_module --with-http_spdy_module \  
--with-http_stub_status_module --with-pcre 

Wokwith-http_stub_status_module: support for nginx status queries
Wok-with-http_ssl_module: https is supported
Copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted copyrighted
Wks64en-pcre: in order to support rewrite rewrite, pcre must be developed

Finally, the output is as follows, indicating configure OK.
...


checking for zlib library ... found
 creating objs/Makefile
Configuration summary
 + using system PCRE library
 + using system OpenSSL library
 + md5: using OpenSSL library
 + sha1: using OpenSSL library
 + using system zlib library
nginx path prefix: "/usr/local/nginx-1.5.1"
 nginx binary file: "/usr/local/nginx-1.5.1/sbin/nginx"
 nginx configuration prefix: "/usr/local/nginx-1.5.1/conf"
 nginx configuration file: "/usr/local/nginx-1.5.1/conf/nginx.conf"
 nginx pid file: "/usr/local/nginx-1.5.1/logs/nginx.pid"
 nginx error log file: "/usr/local/nginx-1.5.1/logs/error.log"
 nginx http access log file: "/usr/local/nginx-1.5.1/logs/access.log"
 nginx http client request body temporary files: "client_body_temp"
 nginx http proxy temporary files: "proxy_temp"
 nginx http fastcgi temporary files: "fastcgi_temp"
 nginx http uwsgi temporary files: "uwsgi_temp"
 nginx http scgi temporary files: "scgi_temp"
# make // Make sure your server is installed make , if not installed please execute yum install make
 # make install

3. Start, close, and reset nginx
startup: directly execute the following command,nginx started, do not need to change any configuration file,nginx configuration multi-domain virtual host please refer to the following article.


/usr/local/nginx-1.5.1/sbin/nginx 

Try accessing: I don't have a map on my side, just use the curl command to read the web message


[root@ns conf]# curl -s http://localhost | grep nginx.com  

nginx.com.
Close:


/usr/local/nginx-1.5.1/sbin/nginx -s stop 

Reset: when you have changed the configuration file, you only need reload or less


/usr/local/nginx-1.5.1/sbin/nginx -s reload 

This is the end of the entire nginx installation.


Related articles: