Home > Backend Development > PHP Tutorial > Install nginx128 under Centos65

Install nginx128 under Centos65

WBOY
Release: 2016-08-08 09:21:55
Original
985 people have browsed it

1. Select the source code directory
Select the directory /usr/local/

cd /usr/local/

2. Install the PCRE library (prepare the installation package pcre-8.36.zip to the local directory)
cd /usr/local /
zip pcre-8.36.zip
cd pcre-8.36
./configure (compile)
make (pre-installation)
make install (formal installation)

3. Install the zlib library
cd /usr/local/
wget http ://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8
./configure
make
make install
4. Install ssl ( Some vps do not have ssl installed by default)

cd /usr/local/
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -zxvf openssl-1.0.1c.tar .gz
cd openssl-1.0.1c
./config
make

make install


5. Install nginx

Nginx generally has two versions, namely the stable version and the development version. You can choose according to your purpose For one of these two versions, here are the detailed steps to install Nginx to the /usr/local/nginx directory:

cd /usr/local/
wget http://nginx.org/download/nginx-1.2. 8.tar.gz
tar -zxvf nginx-1.2.8.tar.gz
cd nginx-1.2.8
./configure --prefix=/usr/local/nginx --user=www --group=www - -with-pcre=/usr/local/pcre-8.36 --with-zlib=/usr/local/zlib-1.2.8 --with-openssl=/usr/local/openssl-1.0.1c --with-http_ssl_module --with-http_stub_status_module(The above needs to be written on multiple lines for display, and the content needs to be on the same line during execution)
make
make install

--with-pcre=/usr/local/pcre-8.36 (referring to It is the source code path of pcre-8.21. )

--with-zlib=/usr/local/zlib-1.2.8 (referring to the source code path of zlib-1.2.8.)...

After successful installation/usr/local/nginx/ The conf directory is as follows
------------------------------------------------ ------------------------

Port
Start to ensure that the system's port 80 is not occupied by other programs

#netstat -ano|grep 80
If no result is found, execute it. If there is a result, ignore this step

Start

/usr/local/nginx/sbin/nginx Start Nginx

Open the browser to access the IP of this machine. If the browser displays Welcome to nginx! means that Nginx has been installed and run successfully.

The running results are as follows:

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the installation of nginx128 under Centos65, including the relevant content. 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