switching network
- Installation tengine compatible nginx configured and enabled module ngx_http_concat_module
- ngx_http_concat_module this module is similar to the apache mod_concat module for combining a plurality of files in response to the text message.
- --with-http_concat_module enable ngx_http_concat_module 静态模块
- --with-http_concat_module=shared enable ngx_http_concat_module (shared) 动态模块
2. Install
yum install -y vim lrzsz tree screen psmisc lsof tcpdump wget ntpdate gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel net-tools iotop bc zip unzip zlib-devel bash-completion nfs-utils automake libxml2 libxml2-devel libxslt libxslt-devel perl perl-ExtUtils-Embed
cd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
cd tengine-2.1.2
Query nginx configuration, and delete module does not support
/apps/nginx/sbin/nginx -V
In tengine-2.1.2 compiler installation directory
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module
make && make install
Import nginx profile tengine profile
vim /apps/tengine/conf/nginx.conf
include /apps/nginx/conf/server/*.conf;
}
3. ngx_http_concat_module statically compiled directly into tengine
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module --with-http_concat_module
make && make install
Open concat module in the configuration file location in
concat on;
/apps/tengine/sbin/nginx -t
/apps/tengine/sbin/nginx -s start
4. Remove tengine reinstall tengine, ngx_http_concat_module dynamically compiled directly into tengine
In tengine-2.1.2 compiler installation directory
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module
make && make install
Import nginx profile tengine profile
vim /apps/tengine/conf/nginx.conf
include /apps/nginx/conf/server/*.conf;
}
Compiled ngx_http_concat_module dynamic module to the installation directory
- Dynamic module can not stop tengine (nginx), called directly in the configuration file module reload the configuration file extension for completion of tengine
./configure --prefix=/apps/tengine --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --add-module=/usr/local/src/echo-nginx-module --with-http_concat_module=shared
make dso_install
ll /apps/tengine/modules/
rwxr-xr-x 1 root root 93264 Jun 1 10:42 ngx_http_concat_module.so
vim /apps/tengine/conf/nginx.conf
dso {
load ngx_http_concat_module.so;
}
/apps/tengine/sbin/nginx -t
/apps/tengine/sbin/nginx -s start