CentOS 6 installs Nginx centos nginx starts centos6.5 nginx centos7 installs ngin

WBOY
Release: 2016-07-29 08:52:18
Original
1384 people have browsed it

1. Install dependent modules

                                                                                             . Download nginx-sticky plugin


	yum install gcc
	yum install g++
	yum install openssl openssl--devel    
	yum install zlib zlib-devel 
	yum install pcre pcre-devel 
	yum -y install gcc-c++
Copy after login

2 , download

nginx


         cd /usr/local
Copy after login

After that, enter the decompression directory:


wget http://nginx-sticky-module.googlecode.com/files/nginx-sticky-module-1.1.tar.gz   
tar -xzvf nginx-sticky-module-1.1.tar.gz 
Copy after login
Execute ./configure and finally make & make install.
ps:

If the above dependent modules cannot be found during installation, use --with-openssl=,
--with-pcre
=,

--with-zlib=

< ;zlib_dir>Specifies the dependent module directory. If it has been installed, the path here is the installation directory; if it has not been installed, this path is the compiled installation package path, and nginx will perform the default compilation and installation of the module.

After passing the above steps, use the w

hereis

nginx

command to view the nginx directory - it appears: nginx: /usr/local/nginx Open http://localhost in the browser :


ok,succeed!!!

Three, what can Nginx bring to my website? time :

                                                                                                                                                                                                   . Server, at this time, the user's request will be processed by that application server. The choice of which application server will handle and respond to our user request falls on our load balancing device, so (ps: The picture below is just for implementation A model of load balancing, as well as other request and response processing models): centos nginx 安装,nginx,centos7 nginx,centos nginx 配置,centos nginx php,centos yum nginx,centos nginx 启动,centos6.5 nginx,centos7 安装 ngin

In addition, in addition to the role of request response as a selection, Nginx also has its own function in caching static resources. Advantages, so there is a technical combination of using Nginx to make up for the shortcomings of nodejs. At this time, our nginx server acts as a cache server.

The above introduces the installation of Nginx on CentOS 6, including centos and nginx. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template