: This article describes how to install nginx128 in CentOS 65. if you are interested in the PHP Tutorial, refer to it. 1. select the source code directory
Selected directory/usr/local/
Cd/usr/local/
2.install the pcrewarehouse (install the pcre-8.36.zip package to the local directory)
Cd/usr/local/
Zip pcre-8.36.zip
Cd pcre-8.36
./Configure (compilation)
Make (pre-installation)
Make install)
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 (ssl is not installed in some vps 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: stable version and development version. you can select one of these two versions based on your purpose, the following describes how to install Nginx in 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 (above to show the need to write in multiple lines, the content must be in the same line)
Make
Make install
-- With-pcre =/usr/local/pcre-8.36 (refers to the source code path of the pcre-8.21 .)
-- With-zlib =/usr/local/zlib-1.2.8 (refers to the source code path of the zlib-1.2.8 .).....
After the installation is successful, the/usr/local/nginx/conf directory is as follows:
----------------------------------------------------------------------
Port
Start to ensure that Port 80 of the system is not occupied by other programs
# Netstat-ano | grep 80
If no result is found, skip this step.
Start
/Usr/local/nginx/sbin/nginx start Nginx
Open the browser to access the IP address of this machine. if the browser displays Welcome to nginx! Nginx has been installed and runs successfully.
The running result is as follows:
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above describes how to install nginx128 in Centos65, including some content. I hope my friends who are interested in the PHP Tutorial can help me.