1. Download Nginx on Nginx website First, Nginx's download address:Http://nginx.org/en/download.html.
2. Installation Prerequisites: yum-y install makezlib zlib-devel gcc gcc-c++ ssh libtool
3. Unzip and download Nginx
4. When compiling Nginx, the following error will appear
The location of the arrows on the map indicates that we are missing the Pcre library, at which point we first look at whether the library exists by default in the system and use the RPM-QA pcre name to see if the library is available by default in the system.
Pcre version, pcre-7.8-7.el6 such a typeface.
This version of the library is intended to exist, and can not be resolved in the error, the solution is to download a high version of their own from the http://ncu.dl.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz.
after downloading, we need to remove the default Pcreku from the system. (If you do not delete it, it will always appear in the marked error), before deleting, we need to back up the next directory under lib64 below libpcre.so.0, after the backup is complete, use the rpm-e--nodeps pcre command to remove the system default Pcre library.
Then extract the previously downloaded Pcre library, first use the./configure to configure, and then use the make command to compile, check the compile with the made, and if successful, you will see the total and the number of successes is the same. Finally, use the Make install command to install the Pcre library.
After the installation completes the Pcre library, we can configure, compile, install the nginx.
after the installation succeeds, switch to the root directory and execute the nginx command if the following error occurs:-----> Error while loading shared Libraries:libpcre.so.1:connot open
Shared object File:no such file or directory
From the above error we can see that the root directory is missing libpcre.so.1 This library, at this time need to use the following command to resolve the error, Ln-s/user/nginx-1.8.1/lib/libprce.so.1 ( This directory is my nginx compilation specified under a directory)/lib64 (if it is a 32-bit system, it should be/lib)
Execute the Ngix command again at this time without error.
The above describes the installation of the Linux system Nginx, including the installation of Linux system content, I hope that the PHP tutorial interested in a friend helpful.