导航:首页 > 源码编译 > 重新编译nginx增加rtmp模块

重新编译nginx增加rtmp模块

发布时间:2023-08-09 14:55:41

㈠ 问下像YY直播那样给的RTMP推流地址建的是什么服务器 怎样搭建这样的服务器

可以使用nginx的rtmp模块来搭建。可以在github上下载,进入nginx目录,执行命令./configure --prefix=./bin --add-mole=../nginx-rtmp-mole-1.2.1在这个过程中可能因为环境不同而出现不同错误,比如缺少pcre、openssl等,这时候就需要安装这些库。

nginx.conf配置文件信息

userroot;
worker_processes1;

error_loglogs/error.logdebug;

events{
worker_connections1024;
}

rtmp{
server{
listen1935;
applicationmyapp{
liveon;
drop_idle_publisher5s;
}
}
}
http{
server{
listen8081;
location/stat{
rtmp_statall;
rtmp_stat_stylesheetstat.xsl;
}
location/stat.xsl{
root/root/nginx-rtmp-mole-1.2.1/;
}
location/control{
rtmp_controlall;
}
location/rtmp-publisher{
root/root/nginx-rtmp-mole-1.2.1/test;
}

location/{
root/root/nginx-rtmp-mole-1.2.1/test/www;
}
}
}

全部完成之后 重新启动nginx

㈡ 在nginx.conf中加入rtmp后nginx启动不了

1)正确编译和安装:网页链接

2)安装完成后,键入 nginx -V 命令查看(无法找到命令的话,请使用绝对路径访问 nginx 可执行文件)

正常编译安装情况

应当出现类似 --add-mole=nginx-rtmp-mole 字样

3)问题依旧可以尝试:

  1. 移除旧安装目录下文件(rm -rf /usr/local/nginx)

  2. 清楚编译产生的文件(make clean)

  3. 使用正确的选项重新编译安装

  4. 问题还在?尝试换个 nginx 版本,再重复上述步骤

㈢ Ubuntu下Nginx 安装rtmp模块失败

安装已经结束,下面来看配置。
在nginx安装目录下先复制一份默认的配置文件出来:
cd /usr/local/nginx/conf
cp nginx.conf live_rtmp.conf12

编辑live_rtmp.conf如下:
#user nobody;
worker_processes 1;

error_log logs/error.log;

㈣ window版本的nginx能重新编译吗如何添加新的模块呢

找到安装nginx的源码根目录,如果没有的话下载新的源码
http://nginx.org
tar xvzf nginx-1.3.2.tar.gz
查看ngixn版本极其编译参数
/usr/local/nginx/sbin/nginx -V
进入nginx源码目录
cd nginx-1.3.2
以下是重新编译的代码和模块
./configure --prefix=/usr/local/nginx--with-http_stub_status_mole
--with-http_ssl_mole --with-file-aio --with-http_realip_mole
make 千万别make install,否则就覆盖安装了
make完之后在objs目录下就多了个nginx,这个就是新版本的程序了
备份旧的nginx程序
cp /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak
把新的nginx程序覆盖旧的
cp objs/nginx /usr/local/nginx/sbin/nginx
测试新的nginx程序是否正确
/usr/local/nginx/sbin/nginx -t
nginx: theconfiguration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx:configuration file /usr/local/nginx/conf/nginx.conf test issuccessful
平滑重启nginx
/usr/local/nginx/sbin/nginx -s reload
查看ngixn版本极其编译参数
/usr/local/nginx/sbin/nginx -V
这是我重新编译的代码:
./configure --prefix=/usr/local/nginx --with-google_perftools_mole
--user=www --group=www --with-http_stub_status_mole
--with-http_gzip_static_mole --with-openssl=/usr/
--with-pcre=/mydata/soft/pcre-8.31

㈤ nginx怎么搭建非本地rtmp服务器

1、电源一定要看清楚是不是正负极接线反向了;
2、如果仿真的时候,其它的东西都按照书本的要求填了,还是提示下面这个初始化错误,那就是没有加powergui模块。

阅读全文

与重新编译nginx增加rtmp模块相关的资料

热点内容
戴尔服务器r630怎么装系统 浏览:11
程序员禁忌 浏览:519
安卓什么时候更新神器系统 浏览:810
epc的算法 浏览:274
创造与魔法如何提前进入服务器 浏览:89
高考复习压缩语段 浏览:71
程序员的正装视频 浏览:830
程序员下班兼职做什么好 浏览:596
怎么安装京喜app 浏览:522
androidthings是什么 浏览:891
文件夹变应用程序怎么打开 浏览:224
苹果7震动加密 浏览:849
java实现事件 浏览:655
java权限菜单 浏览:378
pythonlist分配空间 浏览:565
数据挖掘中层次聚类算法实验 浏览:173
开发完app如何配置服务器 浏览:819
汽车压缩机工作但是压力不变 浏览:86
开发编译软件好吗 浏览:901
微信朋友圈发几兆的图片不会被压缩 浏览:291