• centos 安装 rtmp nginx 视频流服务器


    ---恢复内容开始---

    1.使用yum安装git

     yum -y install git
    

    2.下载nginx-rtmp-module,官方github地址

    // 通过git clone 的方式下载到服务器上
     git clone https://github.com/arut/nginx-rtmp-module.git
    

    3.yum 安装 openssl

     yum -y install openssl openssl-devel

    4.下载Nginx解压,并添加rtmp和openssl支持

    //这里我安装的是 nginx-1.10.3 版本
    wget http://nginx.org/download/nginx-1.10.3.tar.gz 
    tar -zxvf nginx-1.10.3.tar.gz 
    cd nginx-1.10.3
    //添加rtmp和openssl支持
     ./configure --add-module=/(2中的model的父路径)/nginx-rtmp-module --with-http_ssl_module
     make && make install

    5.检验nginx是否安装成功
      
      1.查看当前安装的Nginx版本 [root~]# /usr/local/nginx/sbin/nginx -v
        查询结果:nginx version: nginx/1.10.3
      2,制作systemctl 快速启动
        在/usr/lib/systemd/system/ 目录下,创建一个nginx.service,vim进行编辑,添加下面内容
    [Unit]
    Description=nginx
    After=network.target
    
    [Service]
    Type=forking
    ExecStart=/usr/local/nginx/sbin/nginx
    ExecReload=/usr/local/nginx/sbin/nginx reload
    ExecStop=/usr/local/nginx/sbin/nginx quit
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target
    

      systemctl start nginx  //开启

      systemctl stop nginx //关闭

      systemctl restart nginx //重启

      2.此时在浏览器中打开 自己的ip地址或者绑定的域名:/usr/local/nginx/conf/nginx.conf 文件中的 http-server-listen 端口,防火墙开启对应端口,出现欢迎页面就表示启动成功了
     


  • 相关阅读:
    timeDate.js 插件优化
    向页面中插入不同格式的时间(timeDate.js)
    html
    html
    html
    html
    three.js
    three.js
    three.js
    python之路_头像预览、each循环及form组件校验验证码
  • 原文地址:https://www.cnblogs.com/fengchuxiaodai/p/9375660.html
Copyright © 2020-2023  润新知