centos 7搭建直播間

2021-10-03 01:19:19 字數 2730 閱讀 4540

yum -y install gcc gcc-c++ autoconf automake make

yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel

[root@tecent ~]# cd /usr/local

[root@tecent ~]# groupadd nginx

[root@tecent ~]# useradd -s /sbin/nologin -g nginx -m nginx

[root@tecent ~]# yum install wget -y

[root@tecent ~]# wget -c

[root@tecent ~]# tar -zxvf nginx-1.13.12.tar.gz

[root@tecent ~]# mkdir -p /usr/local/nginx/module

[root@tecent ~]# mkdir -p /usr/local/nginx/vod/flvs

[root@tecent ~]# mkdir /var/log/nginx

[root@tecent ~]# cd /usr/local/nginx/module

[root@tecent ~]# yum install git -y

[root@tecent ~]# git clone

[root@tecent ~]# cd /usr/local/nginx-1.13.12/

[root@tecent ~]# ./configure --prefix=/usr/local/nginx --add-module=/usr/local/nginx/module/nginx-rtmp-module

[root@tecent ~]# make && make install

[root@tecent ~]# /usr/local/nginx/sbin/nginx #到此步測試在瀏覽器上輸入ip

1.vim /usr/local/nginx/conf/nginx.conf,底下的引數資訊是配置好的,可以直接覆蓋

3.放行埠

[root@tecent ~]# firewall-cmd --add-port=80/tcp --permanent

[root@tecent ~]# firewall-cmd --add-port=1935/tcp --permanent

[root@tecent ~]# firewall-cmd --reload

4.過載配置

[root@tecent ~]#  /usr/local/nginx/sbin/nginx -s reload(穩妥起見先關服務再開啟服務)
輸入伺服器的ip位址,出現以下畫面

五、最後需要處理的尾巴

是在nginx的配置檔案中已經提到庀jnginx的版本號;

和1相同,本來在流量統計介面紅色區域有nginx和rtmp模組的版本資訊(這是處理之後的,處理之前忘了截圖),建議關閉,具體需要處理的檔案是/usr/local/nginx/module/nginx-rtmp-module/stat.xsl

3.還有認識我的各位大佬應該都知道我兩台伺服器的位址,就不用幫我安全測試了[捂臉][捂臉]

centos 7搭建直播間第二天版

root tecent yum install readline devel pcre devel openssl devel y root tecent yum install wget perl gcc unzip y root tecent wget root tecent tar xvf o...

Centos7搭建LAMP Typecho部落格

yum install httpd 安裝httpd服務 systemctl start httpd 啟動httpd服務 systemctl status httpd 檢視httpd服務狀態,看到active active running 說明httpd服務已啟動 systemctl enable h...

centos7搭建lnmp環境

安裝php 5.6.26 wget 解壓 tar zxvf php 5.6.26.tar.gz 安裝編譯用的環境 yum install y libxml2 devel openssl devel libcurl devel libjpeg devel libpng devel libicu dev...