流媒体服务器和mysql主从复制、读写分离配置文档.docxVIP

  • 3
  • 0
  • 约6.39千字
  • 约 8页
  • 2017-06-20 发布于湖北
  • 举报

流媒体服务器和mysql主从复制、读写分离配置文档.docx

参考文档: 流媒体rtmp安装过程:rtmp实现是通过nginxrtmp模块实现的.#注意如果以前没有安装过此模块,nginx必须重新编译。安装nginx:参考文档:/install/arut/nginx-rtmp-module安装依赖包:yum -y installgccautomakeautoconflibtool安装pcre库:wget?ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gztar-zxvf pcre-8.21.tar.gzcdpcre-8.21./configuremakemakeinstall安装zlib库:wget?/zlib-1.2.8.tar.gztar-zxvf zlib-1.2.8.tar.gzcdzlib-1.2.8./configuremakemakeinstall下载openssl源码:wget /source/openssl-1.0.1c.tar.gztar-zxvf openssl-1.0.1c.tar.gz下载nginx源码:wget/nginx/nginx-1.4.1.tar.gz下载rtmp源码:wget1/arut-nginx-rtmp-module-v1.0.1-4-g0f95890.tar.gz编译nginx:./configure --add-module=/home/lab/download/arut-nginx-rtmp-module-0f95890/ --prefix=/usr/local/nginx/ --with-http_flv_module --with-http_mp4_module --with-http_ssl_module --with-http_stub_status_module --with-pcre=/home/lab/download/pcre-8.32 --with-zlib=/home/lab/download/zlib-1.2.7 --with-openssl=/home/lab/download/openssl-1.0.1c编译选项解释:--add-module 添加模块模块源码路径--with-http_flv_module添加flv支持--with-http_mp4_module 添加mp4支持--with-http_stub_status_module添加nginx status模块--with-pcre添加pcre源码路径--with-zlib添加zlib源码路径--with-openssl添加openssl源码路径make make install;启动rtmp支持:在nginx.conf添加include rtmp.conf;rtmp.conf内容如下:rtmp_auto_push on;rtmp {server{ listen 1935; #端口chunk_size 4000;applicationvod{ play /home/nginx_wwwroot; #视频目录 } }}nginxrtmp支持http方式查看rtmp状态:配置如下:server{listen 80;server_name ;access_log /var/log/.log;root /home/nginx_wwwroot;index index.html index.htm;location / { }#mp4 http播放location ~ \.mp4 {#可以限速 #limit_rate 100k; mp4; mp4_buffer_size 1m;mp4_max_buffer_size 5m; }#rtmp状态location /stat {rtmp_stat all; # Use this stylesheet to view XML as web page # in browserrtmp_stat_stylesheet stat.xsl; }#stat.xsl 可以从源码包找到location /stat.xsl {# XML stylesheet to view RTMP stats. # Copy stat.xsl wherever you want # and put the full direct

文档评论(0)

1亿VIP精品文档

相关文档