CentOS下安装gperftools优化nginx
2018-02-20 20:52
423 查看
一、下载软件包 http://mirror.yongbok.net/nongnu/libunwind/libunwind-1.1.tar.gz #下载libunwind https://gperftools.googlecode.com/files/gperftools-2.0.tar.gz #下载gperftools 上传软件包到服务器的/usr/local/src目录下面 二、安装gperftools 1、安装libunwind(安装gperftools前需要先安装libunwind) cd /usr/local/src #进入安装目录 tar zxvf libunwind-1.1.tar.gz #解压 cd libunwind-1.1 ./configure #配置 make #编译 make install #安装 系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容 版权所有,转载请注明出处及原文链接 2、安装gperftools cd /usr/local/src tar zxvf gperftools-2.0.tar.gz cd gperftools-2.0 #进入目录 ./configure --enable-frame-pointers #配置 make make install 3、配置gperftools vi /etc/ld.so.conf.d/usr_local_lib.conf #编辑,添加以下内容 /usr/local/lib :wq! #保存退出 /sbin/ldconfig #执行此命令 cd /usr/local/src/nginx-1.2.4 #进入nginx安装包目录 ./configure --prefix=/usr/local/nginx --with-google_perftools_module --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-openssl=/usr/ --with-pcre=/usr/local/src/pcre-8.31 #重新配置nginx,添加--with-google_perftools_module参数 make #编译 make install #安装 mkdir /tmp/tcmalloc #新建目录 chmod 777 /tmp/tcmalloc -R #设置目录权限 4、配置nginx
vi /usr/local/nginx/conf/nginx.conf #编辑,在#pid logs/nginx.pid;这行的下面添加
google_perftools_profiles /tmp/tcmalloc;
:wq! #保存退出
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容 版权所有,转载请注明出处及原文链接
service nginx restart #重启nginx
三、测试
lsof -n | grep tcmalloc #测试tcmalloc
lsof -n | grep nginx #测试nginx
至此,CentOS下安装gperftools优化nginx完成。
相关文章推荐
- Google PerfTools 安装及利用它优化Nginx
- gperftools优化nginx(内存)
- 利用(Tcmalloc) google-perftools优化Nginx和MySQL性能
- 使用google-perftools优化nginx在高并发时的性能的教程(完整版)
- 使用google-perftools优化nginx在高并发时的性能完整教程[第二版]
- 利用 gperftools 对nginx mysql 内存管理 性能优化
- 使用google-perftools优化nginx在高并发时的性能
- Nginx编译安装之自定义google_perftools not found
- centos 安装nginx并且优化
- CentOS下载安装Nginx, 详情配置Nginx和对Nginx进行性能优化
- 使用gperftools优化Nginx和MySQL内存管理
- 使用Google PerfTools 优化Nginx
- google-perftools优化nginx在高并发时的性能
- 使用gperftools优化Nginx和MySQL内存管理
- 用gperftools优化Nginx和MySQL内存管理
- Centos7.4安装Nginx及优化(一)
- 删:Centos 7安装Nginx 1.8
- CentOS源码编译安装Nginx
- Centos7 编译安装 Nginx Mariadb Asp.net Core2 (实测 笔记 Centos 7.3 + Openssl 1.1.0f + Mariadb 10.2.7 + Nginx 1.12.1 + Asp.net. Core 2 )
- Linux(CentOS)下,下载安装Nginx并配置