tcMalloc优化nginx
记住:nginx一定要先启动
1>下载安装libunwind:
#wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99.tar.gz
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-alpha.tar.gz
tar -zxvf libunwind-0.99-alpha.tar.gz
cd libunwind-0.99-alpha
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install
2>下载安装Google-perftools
wget http://soft.7dot.com/soft/google-perftools-1.8.tar.gz
tar -zxvf google-perftools-1.8.tar.gz
cd google-perftools-1.8
./configure
make && make install
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
3>重新编译nginx(使nginx支持Google-perftools)
cd nginx-1.2.8
./configure --with-google_perftools_module --with-http_stub_status_module