参考链接:http://haili.me/archives/127
附件:pcre 8.20、Google-perftools2.0、nginx1.3.3、libunwind 1.01
下面所有命令以root用户执行。
首先要安装gcc。
1.以root身份执行
yum install -y gcc*
2.安装openSSL和zlib
yum install zlib* openssl* -y
3.安装libunwind
cd /usr/local/src/
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz
tar zvxf libunwind-1.0.1.tar.gz
cd libunwind-1.0.1
./configure --enable-shared
make && make install
4.安装google-perftools
cd /usr/local/src/
wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
tar zvxf gperftools-2.0.tar.gz
cd gperftools-2.0
./configure --enable-shared --enable-frame-pointers
make && make install
重要:
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
5.安装Pcre
cd /usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.20.tar.gz
tar zvxf pcre-8.20.tar.gz
cd pcre-8.20
./configure
make && make install
6.为nginx应用添加用户
groupadd nginxGroup
useradd -g nginx nginxGroup
passwd nginx
设置nginx密码
以nginx用户身份创建目录
mkdir /tmp/tcmalloc/
为tcmalloc添加目录,并且赋予适当权限
7.安装nginx
cd /usr/local/src
wget http://nginx.org/download/nginx-1.0.10.tar.gz
tar zvxf nginx-1.0.10.tar.gz
cd nginx-1.0.10
开始安装
./configure --user=nginx --group=nginxGroup --prefix=/home/nginx --with-http_stub_status_module --with-http_ssl_module --with-google_perftools_module
make && make install
8.修改 nginx.conf ,令nginx可以 google-perftools实现加速
vim /home/nginx/conf/nginx.conf
修改前面几行
user nginx nginxGroup;
worker_processes 8;
error_log logs/error.log crit;
pid logs/nginx.pid;
google_perftools_profiles /tmp/tcmalloc/;
events{
use epoll;
worker_connections 65535;
}
9.测试和运行
cd /home/nginx
./sbin/nginx -t
如果显示下面信息,即表示配置没问题
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
输入代码运行nginx服务
cd /home/nginx
./sbin/nginx
如果显以类似下面的信息,即表示nginx已经启动
root 30742 0.0 0.0 4012 680 pts/3 S+ 01:27 0:00 grep nginx
输入代码检测是否支持加速
lsof -n | grep tcmalloc
如果显示类似下面的信息,即表示支持tcmalloc加速
nginx 30736 www 9w REG 8,2 0 2584311 /tmp/tcmalloc/.30736
nginx 30737 www 11w REG 8,2 0 2584312 /tmp/tcmalloc/.30737
nginx 30738 www 13w REG 8,2 0 2584313 /tmp/tcmalloc/.30738
nginx 30739 www 15w REG 8,2 0 2584314 /tmp/tcmalloc/.30739
分享到:
相关推荐
ffmpeg+nginx+nginx-rtmp-module搭建个人直播平台。 使用说明(ffmpeg+nginx+rtmp-module已经整合,支持HTTP,具体配置查看conf/nginx.conf): 1.解压后,运行nginx_start.bat。(查看监控状态 ...
nginx全套linux环境搭建包 【nginx-1.2.6】【openssl-1.0.2c】【pcre-8.36】【zlib-1.2.8】
nginx+php-fpm解决502 Bad Gateway.zip
1、在Windows系统下,搭建ffmpeg推流+nginx-http-flv-module直播拉流+FLV.js播放环境,所需依赖相关资源文件。 2、适合初学、研究、验证视频直播部署方案的相关技术人员。
nginx + nginx-http-flv-module-1.2.9
ffmpeg+nginx-rtmp-module+flv监控展示全量资源,包含ffmpeg、编译后的nginx-rtmp-module、flv.min.js、前端展示代码,内含操作文档
nginx全套linux环境搭建包: 1.nginx-1.2.6.tar.gz 2.openssl-fips-2.0.5.tar.gz 3.pcre-8.32.tar.gz 4.zlib-1.2.7.tar.gz 免去您一个个资源寻找的麻烦,本人已测,绝对能用,识货的来!
负载均衡中间件nginx,包含1.12版本和1.14版本,以及其三个插件pcre8.34,zlib1.2.11,openssl-fips-2.0.16
Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合 Nginx + PHP-FPM + APC=绝妙的组合
centos5.2 源码安装nginx+php-fpm+http push,演示http push 功能,测试通过
nginx1.16版本 后端节点健康检查、自动隔离+nginx_upstream_check_module-master+nginx-upload-module
在windows 7 64位 环境下使用nginx的nginx-http-flv-module搭建flv视频流播放所有的安装包,参考:https://blog.csdn.net/qq_33071429/article/details/102628008
Linux+Nginx+Mysql+Php安装教程
nginx-1.16.1.tar.gz + nginx-upload-module-2.3.0.tar.gz
本安装文件修改了源码网的“CentOS 集成linux+php-cgi+nginx+mysql安装包“里面的部分文件,主要是修改了install.sh内的几个错误位置。目前我测试在centos 5.4下,安装一切正常! 使用这个安装之前请一定看一下本...
jdk-8u151+maven-3.3.9+nginx-1.9.12+zookeeper-3.3.6+tomcat-8.5.23+redis-2.6 资源整合下载
nginx带nginx-http-flv模块,包含所有rtmp功能,我自己在windows下编译的,直接可用,用的是最新版的1.19.4版本
Nginx本身是一个非常出色的HTTP服务器,FFMPEG是非常好的音...不同的是在configure的时候需要增加nginx-rtmp-module的支持,下载好nginx-rtmp-module后解压,然后nginx安装时增加这个模块(--add-module),其它都是一样的.
该资源包含是liunx环境的,包含nginx安装包,ffmepg安装包,nginx-http-flv-module安装包和html展示页面
nginx+lua+docker+docker-compose实现简单服务分发