Nginx Compile install download install package nginx-1.3.15.tar.gz tar zxvf nginx-1.3.15.tar.gz cd nginx-1.3.15/compile
./configure--user=www--group=www--prefix=/usr/local/nginx\--with-http_stub_status_module--with-http_ssl_module Make && make install problems encountered
- ./configure:error:c compiler cc is not found
Workaround: Yum-y Install GCC
- Run again after installing GCC
./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_ Module Error:
Hecking for PCRE Library ... not found
Checking for PCRE library in/usr/local/... not found
Checking for PCRE library in/usr/include/pcre/... not found
Checking for PCRE library in/usr/pkg/... not found
Checking for PCRE library in/opt/local/... not found
./configure:error:the HTTP Rewrite module requires the PCRE library.
You can either disable the module by using--without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
Statically from the source with Nginx by using--with-pcre=<path> option.
Workaround: Yum-y Install Pcre-devel
./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_module
Error:
Checking for PCRE JIT-support ... not found
Checking for OpenSSL library ... not found
./CONFIGURE:ERROR:SSL modules require the OpenSSL library.
You can either does not enable the modules, or install the OpenSSL library
Into the system, or build the OpenSSL library statically from the source
With Nginx by using--with-openssl=<path> option.
Workaround: yum-y Install OpenSSL Openssl-devel
Last Run
./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_module Make && make install
After installation, use/usr/local/nigix/sbin/
Start Nginx #./nginx
Problems encountered
Start Nginx: [Emerg] Getpwnam ("www") failed
Remove user Nobody annotations in nginx.conf to
Check whether the startup was successful:
netstat-ano|grep Results Input description started successfully
Open the browser to access the IPof this machine if the browser appears Welcome to nginx! Indicates that Nginx is installed and running successfully
PS: note: You need to turn off Firewall service iptables stop here
Restart
/usr/local/nginx/sbin/nginx–s Reload
or Killall-hup Nginx.
Reference Link: http://www.cnblogs.com/zhuhongbao/archive/2013/06/04/3118061.html
Nginx Compiler Installation