侧边栏壁纸
博主头像
封存记忆 博主等级

行动起来,活在当下

  • 累计撰写 26 篇文章
  • 累计创建 24 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

zlmediakit

Administrator
2024-12-03 / 0 评论 / 0 点赞 / 5 阅读 / 0 字
#安装 epel-release
yum install epel-release -y
#通过rpmfusion存储库安装 rpm
yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm


#清理缓存
yum clean all
#重新生成缓存
yum makecache
#升级yum源
yum uptade

yum -y install wget unzip git vim gcc gcc-c++ openssl-devel SDL-devel ffmpeg ffmpeg-devel

cd ~
wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3.tar.gz
tar -zxvf cmake-3.26.3.tar.gz
cd cmake-3.26.3
./bootstrap
gmake
gmake install
hash -r
cmake --version

cd ~
wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
tar -xvzf openssl-1.1.1k.tar.gz
yum install -y zlib zlib-devel perl-CPAN
cd  openssl-1.1.1k
./config shared --openssldir=/usr/local/openssl --prefix=/usr/local/openssl
make && make install
echo "/usr/local/lib64/" >> /etc/ld.so.conf
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig
ln -s /usr/local/openssl/bin/openssl  /usr/local/bin/openssl # 替换系统openssl,非必须
hash -r
openssl version



cd ~
wget https://codeload.github.com/cisco/libsrtp/tar.gz/refs/tags/v2.4.2 -O libsrtp-2.4.2.tar.gz
tar -xvzf libsrtp-2.4.2.tar.gz
cd libsrtp-2.4.2
./configure --enable-openssl --with-openssl-dir=/usr/local/openssl
make -j8 && make install

cd ~
#国内用户推荐从同步镜像网站gitee下载 
git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit
cd ZLMediaKit
#千万不要忘记执行这句命令
git submodule update --init

mkdir build
cd build
cmake .. -DENABLE_WEBRTC=true  -DOPENSSL_ROOT_DIR=/usr/local/openssl  -DOPENSSL_LIBRARIES=/usr/local/openssl/lib
cmake --build . --target MediaServer

mkdir -p /opt/zlmediakit
cp -rf ~/ZLMediaKit/release/linux/Debug/*   /opt/zlmediakit
cd /opt/zlmediakit
echo "编辑config.ini文件吧,然后运行./MediaServer -d &"
0

评论区