Nginx is a high-performance HTTP and reverse proxy server and a IMAP/POP3/SMTP proxy server. Today we will introduce nginx in many ways, including stress testing for Nginx and HTTP, nginx access, nginx encrypted access, etc.
I. Installation of Nginx
1. Disassemble and install
TAR-ZXVF libevent-2.0.16-stable.tar.gz-c/USR/LOCAL/SRC
./configure--prefix=/usr/local/libevent
Make && make install
2, processing header files and library files
Processing of library files:
Edit/etc/ld.so.conf.d/libevent.conf, content as follows
/usr/local/libevent/lib
Processing of header files:
Ln-s/usr/local/libevent/include/usr/include/libevent
3. In order for Nginx to support Pcre (Perl library), you also need to install a software package called Pcre
After viewing, there are already installed, but some additional libraries are placed inside the package named Pcre-devel, which is installed
4, installation configuration Nginx
Groupadd-r Nginx
Useradd-r-G nginx-s/sbin/nologin-m Nginx (-M does not create any home directory)
TAR-ZXVF nginx-1.0.11.tar.gz-c/USR/LOCAL/SRC
cd/usr/local/src/nginx-1.0.11
./configure \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/\
--http-proxy-temp-path=/var/tmp/nginx/proxy/\
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/\
--with-pcre (Received pcre support)
Make && make install
This column more highlights: http://www.bianceng.cn/Servers/web/