nginx 开启 google perftools 模块

目录

安装 libunwind


cd /usr/local/src
wget http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.2.tar.gz
tar xvf libunwind-1.2.tar.gz
cd libunwind-1.2
./configure
make
make install

安装 gperftools

wget https://github.com/gperftools/gperftools/archive/gperftools-2.5.tar.gz

tar xvf gperftools-2.5.tar.gz 
cd gperftools-2.5/
./configure
make
make install


ln -s /usr/local/lib/libprofiler.so.0 /usr/lib64/libprofiler.so.0
ln -s /usr/local/lib/libunwind.so.8 /usr/lib64/libunwind.so.8

ln -s /usr/local/lib/libprofiler.so.0  /usr/lib/libprofiler.so.0
ln -s /usr/local/lib/libunwind.so.8 /usr/lib/libunwind.so.8

编译安装 nginx

cd /usr/local/src/

wget http://nginx.org/download/nginx-1.10.3.tar.gz
tar xvf nginx-1.10.3.tar.gz

cd nginx-1.10.3

wget -c https://www.openssl.org/source/openssl-1.0.2h.tar.gz
tar xvf openssl-1.0.2h.tar.gz

./configure --prefix=/usr/local/webserver/nginx/ \
--with-openssl=./openssl-1.0.2h \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_sub_module \
--with-http_stub_status_module \
--with-google_perftools_module 

make
make install

目录