安装最新版的jemalloc。从https://github.com/jemalloc/jemalloc/releases下载jemalloc,目前的最新版本为4.4.0下载(下载地址为:https://github.com/jemalloc/jemalloc/releases/download/4.4.0/jemalloc-4.4.0.tar.bz2)
通过 tar xjf jemalloc-4.4.0.tar.bz2 来解压压缩文件,如果出现下面的错误提示:
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Errorisnot recoverable: exiting now
tar: Child returned status 2
tar: Errorisnot recoverable: exiting now
需要安装一下bzip2这个包,即yum install bzip2,安装完毕解压即可。
tar xjf jemalloc-4.4.0.tar.bz2
cd jemalloc-4.4.0
./configure
make && make install
echo'/usr/local/lib' > /etc/ld.so.conf.d/local.conf
ldconfig
进入到tenginx通过./configure --help来查看相关的模块:
[root@soft tengine-tengine-2.2.0]# ./configure --help
--help print this message
--prefix=PATH set installation prefix
--sbin-path=PATH set nginx binary pathname
--conf-path=PATH set nginx.conf pathname
--error-log-path=PATH set error log pathname
--pid-path=PATH set nginx.pid pathname
--lock-path=PATH set nginx.lock pathname
--user=USER set non-privileged user for worker processes
--group=GROUP set non-privileged group for worker processes
--build=NAME set build name
--builddir=DIR set build directory
--enable-mods-shared=all enable all the modules to be shared
--enable-mods-static=all enable all the modules to be static
--dso-path=DIR set dso default load path
--dso-tool-path=DIR set dso_tool pathname
--dso-max-modules=*) set max dso module(defaultis 256) --includedir=DIR set C header files[PREFIX/include]
--with-rtsig_module enable rtsig module --with-select_module enable select module --without-select_module disable select module --with-poll_module enable poll module --without-poll_module disable poll module
--without-procs disable procs module
--with-threads enable thread pool support
--with-file-aio enable file AIO support
--with-ipv6 enable IPv6 support
--with-force-exit enable force_exit support
--without-syslog disable syslog logging
--without-dso disable dso moduleload
--with-http_v2_module enable ngx_http_v2_module
--with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_filter_module
--with-http_xslt_module enable ngx_http_xslt_filter_module
--with-http_image_filter_module enable ngx_http_image_filter_module
--with-http_geoip_module enable ngx_http_geoip_module
--with-http_sub_module enable ngx_http_sub_filter_module
--with-http_dav_module enable ngx_http_dav_module
--with-http_flv_module enable ngx_http_flv_module
--with-http_slice_module enable ngx_http_slice_module
--with-http_mp4_module enable ngx_http_mp4_module
--with-http_gunzip_module enable ngx_http_gunzip_module
--with-http_gzip_static_module enable ngx_http_gzip_static_module
--with-http_auth_request_module enable ngx_http_auth_request_module
--with-http_concat_module enable ngx_http_concat_module
--with-http_random_index_module enable ngx_http_random_index_module
--with-http_secure_link_module enable ngx_http_secure_link_module
--with-http_degradation_module enable ngx_http_degradation_module
--with-http_sysguard_module enable ngx_http_sysguard_module
--with-http_addition_module=shared enable ngx_http_addition_filter_module (shared)
--with-http_xslt_module=shared enable ngx_http_xslt_filter_module (shared)
--with-http_image_filter_module=shared
enable ngx_http_image_filter_module (shared)
--with-http_geoip_module=shared enable ngx_http_geoip_module
--with-http_sub_module=shared enable ngx_http_sub_filter_module (shared)
--with-http_flv_module=shared enabl