Ubuntu20.04搭建

简介: Ubuntu20.04搭建

获取源码

$ git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit
$ cd ZLMediaKit
$ git submodule update --init点击复制复制失败已复制


安装编译环境

$ sudo apt install build-essential cmake openssl ffmpeg libssl-dev libsdl-dev libavcodec-dev libavutil-dev点击复制复制失败已复制


构建和编译

$ cd ZLMediaKit
$ mkdir build
$ cd build
$ cmake ..
$ make -j12点击复制复制失败已复制


启动测试

$ cd ZLMediaKit/release/linux/Debug
#通过-h可以了解启动参数
$ ./MediaServer -h
# 启动测试
$ sudo ./MediaServer
2021-10-19 15:08:36.528 I MediaServer[115881-main thread] System.cpp:130 systemSetup | core文件大小设置为:18446744073709551615
2021-10-19 15:08:36.528 I MediaServer[115881-main thread] System.cpp:139 systemSetup | 文件最大描述符个数设置为:1048576
2021-10-19 15:08:36.529 W MediaServer[115881-main thread] SSLUtil.cpp:98 loadPublicKey | error:02001002:system library:fopen:No such file or directory
2021-10-19 15:08:36.529 W MediaServer[115881-main thread] SSLUtil.cpp:126 loadPrivateKey | error:2006D080:BIO routines:BIO_new_file:no such file
2021-10-19 15:08:36.530 D MediaServer[115881-stamp thread] util.cpp:342 operator() | Stamp thread started!
2021-10-19 15:08:36.530 I MediaServer[115881-main thread] EventPoller.cpp:466 EventPollerPool | 创建EventPoller个数:12
2021-10-19 15:08:36.530 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:554
2021-10-19 15:08:36.531 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:332
2021-10-19 15:08:36.531 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:1935
2021-10-19 15:08:36.531 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:19350
2021-10-19 15:08:36.531 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:80
2021-10-19 15:08:36.531 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:443
2021-10-19 15:08:36.532 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:9000
2021-10-19 15:08:36.532 I MediaServer[115881-main thread] TcpServer.cpp:188 start_l | TCP Server listening on 0.0.0.0:10000
2021-10-19 15:08:36.532 I MediaServer[115881-main thread] UdpServer.cpp:78 start_l | UDP Server bind to 0.0.0.0:10000
2021-10-19 15:08:36.532 I MediaServer[115881-main thread] main.cpp:329 start_main | 已启动http api 接口
2021-10-19 15:08:36.532 I MediaServer[115881-main thread] main.cpp:331 start_main | 已启动http hook 接口点击复制复制失败已复制


提示

这个程序需要占用 55480 端口,因此需要 sudo 权限运行,一般 80 端口都会被 nginx 占用,注意先关闭 nginx ,关闭命令: $ sudo systemctl stop nginx


服务方式运行

$ sudo ./MediaServer -d &
目录
相关文章
|
5月前
|
Ubuntu Linux Shell
ubuntu的学习与总结
在Ubuntu的学习中,了解了Linux的文件系统结构,所有内容都从根目录/开始,没有像Windows那样的盘符。
107 0
|
Kubernetes Ubuntu 应用服务中间件
在Ubuntu上安装K8S教程
在Ubuntu上安装K8S教程
3658 1
|
2月前
|
Ubuntu Apache
Ubuntu20.04下一键安装Moveit
本文提供了一个一键安装Moveit的脚本工具,旨在帮助中国地区的用户在Ubuntu 20.04系统上安装Moveit并配置相关环境。脚本包括安装必要包、创建catkin工作空间、克隆Moveit源代码和示例代码、使用rosdep安装依赖以及构建工作空间,并提供了详细的使用说明和源码。
61 0
Ubuntu20.04下一键安装Moveit
|
3月前
|
Ubuntu Java Linux
玩转Ubuntu零基础教程,让你成为Ubuntu高手。
本教程将介绍Ubuntu操作系统的各个方面。它探讨了Ubuntu桌面版的各种功能,风格和工作。比较我们通常会在Windows操作系统上找到的软件。有一些专注于Ubuntu服务器版本的章节。本教程还包括有兴趣了解Ubuntu的虚拟机和云端的人员的独立章节。
61 1
玩转Ubuntu零基础教程,让你成为Ubuntu高手。
|
5月前
|
Ubuntu 安全 Linux
Ubuntu零基础教程
Ubuntu零基础教程
56 0
|
Ubuntu Java Linux
Ubuntu 20.04 安装配置
Ubuntu 20.04 安装配置
133 0
|
运维 关系型数据库 MySQL
|
Ubuntu 安全 Shell
搭建自己的专属Ubuntu环境(上)
最近有些小伙伴问我,“目前想玩Ubuntu系统,应该怎么搭建一个高大上的开发环境呢?”;本文主要介绍我以前是怎么搭建自己的Ubuntu开发环境。
286 0
搭建自己的专属Ubuntu环境(上)
|
Ubuntu Java Linux
搭建自己的专属Ubuntu环境(中)
上一篇咱们介绍了Ubuntu开发环境的配置,这篇我们接着介绍怎么安装软件,以及有那些有趣的软件值得我们去安装。
210 0
|
Ubuntu Shell
Ubuntu搭建我的世界基岩版
Ubuntu搭建我的世界基岩版
Ubuntu搭建我的世界基岩版