First, install the compilation tools and library files
Yum-y install make zlib zlib-devel gcc-c++ libtool OpenSSL openssl-devel
Second, first to install PCRE
PCRE function is to let Ngnix support Rewrite function.
1, download PCRE installation package,: http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
[Email protected] src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
2. Unpack the installation package:
[Email protected] src]# tar zxvf pcre-8.35.tar.gz
3. Enter the installation package directory
[Email protected] src]# CD pcre-8.35
4. Compile and install
[[email protected] pcre-8.35]#./Configure[[email protected] pcre-8.35]# make && make install
5. View Pcre Version
[Email protected] pcre-8.35]# Pcre-config--version
Installing Nginx
1. Download nginx,:http://nginx.org/download/nginx-1.6.2.tar.gz
[Email protected] src]# wget http://nginx.org/download/nginx-1.6.2.tar.gz
2. Unpack the installation package
[Email protected] src]# tar zxvf nginx-1.6.2.tar.gz
3. Enter the installation package directory
[Email protected] src]# CD nginx-1.6.2
4. Compile and install
./configure && make && make install
5. After the installation is complete, the nginx can be activated:
Sbin/nginx
6. See if it starts
Ps-aux | grep nginx
Access via browser:
Nginx installation (CentOS)