目录
0x00.简介
项目地址:https://github.com/muggot/openmcu.git
官网地址:https://openmcu.ru/
几个参考链接
https://blog.csdn.net/weixin_41501825/article/details/81043120
https://blog.csdn.net/ndhui/article/details/50190969
0x01.部署环境
宿主机环境为CentOS7-x86_64-Minimal2003
0x02.官方安装说明
说明文件为GitHub项目下的INSTALL
-------------------------
Installation instructions
-------------------------
More detailed instructions can be found in the wiki:
http://videoswitch.ru/wiki/en/install/index
Here is basic information.
------------
Dependencies
------------
Requires:
* build tools: gcc make flex bison autoconf automake pkg-config
* FFmpeg >= 0.10.4 - http://www.ffmpeg.org
or Libav >= 0.8 - http://libav.org
* libx264 - http://www.videolan.org/developers/x264.html
* libvpx >= 1.0 - http://webm.googlecode.com
Optional dependencies (will be used if they are available in the system):
* FreeType (http://freetype.org/)
* libjpeg-turbo (http://libjpeg-turbo.virtualgl.org/)
or libjpeg (http://ijg.org/)
OpenMCU-ru contains the following required libraries in the repository:
* PTLib - http://www.opalvoip.org
* H323Plus - http://www.h323plus.org
* Sofia-SIP - http://www.sofia-sip.sourceforge.net
* libSRTP - http://srtp.sourceforge.net/srtp.html
* libzrtp - http://zfoneproject.com/prod_sdk.html
* libyuv - http://www.code.google.com/p/libyuv
Use following lines to install build dependencies on Ubuntu:
apt-get install gcc make flex bison autoconf automake pkg-config
apt-get install libtool
apt-get install libavcodec-dev
apt-get install libavformat-dev
apt-get install libswscale-dev
apt-get install libfreetype6-dev
apt-get install libssl-dev
apt-get install libx264-dev
apt-get install libvpx-dev
--------------
Build on Linux
--------------
./autogen.sh
./configure
make
make install
----------------
Build on FreeBSD
----------------
./autogen.sh
./configure
gmake
gmake install
----------------
Build on Windows
----------------
Build using Microsoft Visual Studio in the following order:
* ptlib\ptlib_*.sln
* h323plus\h323plus_*.sln
* openmcu-ru\win\openmcu_*.sln
----------------
Build and start in Docker
----------------
cd Docker/openmcu-ru/centos-7
docker build -t openmcu-ru .
docker run --network=host -d openmcu-ru
0x03.环境配置
1.防火墙的配置
在实验环境中可以选择直接禁用防火墙,但是在生产环境中根据实际的需求进行规则的配置。
关闭firewalld
在CentOS7上面防火墙是firewalld服务,停止并且禁止开机启动firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
关闭 selinux
setenforce 0
getenforce
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux
grep SELINUX=disabled /etc/sysconfig/selinux
2.依赖环境安装
网站:https://wiki.openmcu.ru/en/install/bin_linux
The ONLY SUPPORTED Linux version is on CentOS. Full installation instructions are available on the OpenMCU-ru Administrator Guide located at https://videoswitch.ru/forum/index.php?topic=1059.0
(1)基础工具
yum install -y libstdc++ freetype libjpeg-turbo git wget
yum install -y gcc gcc-c++
yum install libvorbis yasm freetype zlib bzip2 faac lame speex libvpx libogg libtheora x264 XviD openjpeg15 opencore-amr
(2)Requires
- build tools: gcc make flex bison autoconf automake pkg-config
- FFmpeg >= 0.10.4 - http://www.ffmpeg.org
or Libav >= 0.8 - http://libav.org- libx264 - http://www.videolan.org/developers/x264.html
- libvpx >= 1.0 - http://webm.googlecode.com
- build tools
yum install -y gcc make flex bison autoconf automake pkg-config
- FFmpeg >= 0.10.4 -
http://www.ffmpeg.org
FFmpeg build info
build: ffmpeg-4.3.1-amd64-static.tar.xz,旧版本1,旧版本源码包
version: 4.3.1
gcc: 8.3.0
yasm: 1.3.0.36.ge2569,GitHub,官网
nasm: 2.14.02
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make && make install
yasm --help
yasm --version
which yasm
wget https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz
tar -xvf ffmpeg-4.1.tar.xz
cd ffmpeg-4.1/
./configure
make && make install
ffmpeg --help
ffmpeg -version
which ffmpeg
漫长的等待。。。。。。
or Libav >= 0.8 - http://libav.org
- libav
git clone https://gitee.com/nwaycn/libav.git
cd libav
./configure
make && make install
cp /usr/local/lib/pkgconfig/libavcodec.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavdevice.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavfilter.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavformat.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavresample.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libavutil.pc /usr/lib64/pkgconfig/
cp /usr/local/lib/pkgconfig/libswscale.pc /usr/lib64/pkgconfig/
ldconfig
git clone http://git.videolan.org/git/x264.git
./configure --disable-asm
make && make install
which x264
wget http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
wget http://download1.rpmfusion.org/free/el/updates/7/x86_64/x/x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-libs-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
rpm -hiv x264-devel-0.148-24.20170521gitaaa9aa8.el7.x86_64.rpm
- libvpx >= 1.0
http://webm.googlecode.com
git clone https://freeswitch.org/stash/scm/sd/libvpx.git
cd libvpx
./configure --enable-pic --disable-static --enable-shared
make
make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig
wget http://files.freeswitch.org/downloads/libs/libvpx-1.4.1.tar.gz
tar -xvf libvpx-1.4.1.tar.gz
cd libvpx-1.4.1/
./configure
make && make install
(3)Optional dependencies
- FreeType (http://freetype.org/)
- libjpeg-turbo > (http://libjpeg-turbo.virtualgl.org/)
or libjpeg (http://ijg.org/)
(4)OpenMCU-ru contains the following required libraries
OpenMCU-ru contains the following required libraries in the repository:
- PTLib - http://www.opalvoip.org
- H323Plus - http://www.h323plus.org
- Sofia-SIP - http://www.sofia-sip.sourceforge.net
- libSRTP - http://srtp.sourceforge.net/srtp.html
- libzrtp - http://zfoneproject.com/prod_sdk.html
- libyuv - http://www.code.google.com/p/libyuv
(5)Use following lines to install build dependencies
yum install -y install libtool libavcodec-dev libavformat-dev libswscale-dev libfreetype6-dev libssl-dev libx264-dev libvpx-dev
0x03.安装OpenMCU
官网地址:https://openmcu.ru/index.html
项目地址:https://github.com/muggot/openmcu.git
git clone https://github.com/muggot/openmcu.git
安装
cd openmcu
./configure
make && make install
0x04.运行OpenMCU
网站:https://wiki.openmcu.ru/en/install/bin_linux
Service control: service openmcu-ru (start|stop)
Service launch config: /etc/default/openmcu-ru
Service configs: /etc/openmcu-ru/*
Service runs as an unprivileged user ‘mcu’.
service openmcu-ru start
查看主机端口运行情况
netstat -lntp
[root@host ~]# netstat -lntp | grep openmcu
tcp 0 0 0.0.0.0:1554 0.0.0.0:* LISTEN 4886/openmcu-ru
tcp 0 0 0.0.0.0:1720 0.0.0.0:* LISTEN 4886/openmcu-ru
tcp 0 0 0.0.0.0:1420 0.0.0.0:* LISTEN 4886/openmcu-ru
tcp 0 0 0.0.0.0:1423 0.0.0.0:* LISTEN 4886/openmcu-ru
[root@host ~]#
0x05.访问页面
Welcome
Status
Control
Records
Settings