1.安装libunwind库
可以从http://download.savannah.gnu.org/releases/libunwind下载相应的libunwind版本。
# tar xvf libunwind-1.0.tar.gz
# cd libunwind-1.0
# CFLAGS=-fPIC ./configure
# make CFLAGS=-fPIC
# make CFLAGS=-fPIC install
2.安装google-perftools
# tar xvf gperftools-2.0.tar.gz
# cd gperftools-2.0
# ./configure
# make && make install
# echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
# ldconfig
至此,google-perftools安装完成。
3.修改MySQL启动脚本(根据你的MySQL安装位置而定):
vim /usr/local/webserver/mysql/bin/mysqld_safe