下载google-perftools-1.6.tar.gz
wget http://google-perftools.googlecode.com/files/google-perftools-1.6.tar.gz
tar zxvf google-perftools-1.6.tar.gz
执行./configure --prefix=/usr/local/google-perftools-1.6
make && make install
echo "/usr/local/google-perftools-1.6/lib" > /etc/ld.so.conf
ldconfig
Nginx 优化编译nginx时 增加 --with-google_perftools_module
--prefix=/usr/local/nginx --user=www --group=www
--with-google_perftools_modulemake
make install
ldd /usr/local/nginx/sbin/nginx
linux-gate.so.1 => (0x00493000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00110000)
libpcre.so.0 => /lib/libpcre.so.0 (0x002db000)
libcrypto.so.6 => /lib/libcrypto.so.6 (0x009ae000)
libz.so.1 => /usr/lib/libz.so.1 (0x003b0000)
libprofiler.so.0 =>
/usr/local/google-perftools-1.6/lib/libprofiler.so.0 (0x00c51000)
libc.so.6 => /lib/i686/nosegneg/libc.so.6 (0x00142000)
libdl.so.2 => /lib/libdl.so.2 (0x0035c000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00d01000)
libm.so.6 => /lib/i686/nosegneg/libm.so.6 (0x00b28000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00eb8000)
/lib/ld-linux.so.2 (0x00ed5000)
修改 ng
引用地址:
注意: 该地址仅在今日23:59:59之前有效