安装依赖
yum install libunwind-devel graphviz-devel ghostscript automake libtool -y
编译gpreftools
- 源代码:https://github.com/gperftools/gperftools/archive/gperftools-2.7.tar.gz
- 编译安装
- ./autogen.sh
- ./configure
- make && make install
- 导出LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
nginx使用tcmalloc和启用google_perftools_module模块
--with-ld-opt=-ltcmalloc --with-google_perftools_module