Centos compiling environment
# Yum-y install gcc automake autoconf libtool make
Install g ++:
# Yum install gcc-c ++
Install the PCRE library
Cd/usr/local/src
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.34.tar.gz
Tar-zxvf pcre-8.34.tar.gz
Cd pcre-8.34
./Configure
Make
Make install
Install the zlib library:
Cd/usr/local/src
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
Install ssl
Cd/usr/local/src
Wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
Tar-zxvf openssl-1.0.1c.tar.gz
Openssl-1.0.1c/cd
Make
Make install
Or yum install openssl
Install nginx
Cd/usr/local/src
Wget http://nginx.org/download/nginx-1.4.2.tar.gz
Tar-zxvf nginx-1.4.2.tar.gz
Cd nginx-1.4.2
./Configure -- sbin-path =/usr/local/nginx \
-- Conf-path =/usr/local/nginx. conf \
-- Pid-path =/usr/local/nginx. pid \
With-http_ssl_module \
-- With-pcre =/usr/local/src/pcre-8.34 \
-- With-zlib =/usr/local/src/zlib-1.2.8 \
-- With-openssl =/usr/local/src/openssl-1.0.1c
Make
Make install
Run the/usr/local/nginx command to start Nginx
Check whether the firewall rule iptables-L allows port 80. If no firewall policy is added
-A input-m tcp-p tcp -- dport 80-j ACCEPT