Linux开发_CentOS7.4服务器安装NFSNGINX服务器,ffmpegQt环境

Posted DS小龙哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux开发_CentOS7.4服务器安装NFSNGINX服务器,ffmpegQt环境相关的知识,希望对你有一定的参考价值。

1. 环境介绍

环境介绍:采用的是华为云的ECS弹性云服务器–镜像安装的CentOS7.4 64位 -----是服务器版,非桌面版哦。

在CentOS7.4服务器版本的环境下搭建NFS服务器、安装ffmpeg、安装nginx服务器、部署Qt编译环境。

(1)配置NGINX为HTTP服务器,安装rtmp模块,完成rtmp视频推流,支持缓存视频到本地目录、支持转为HLS流,通过浏览器访问直播流。

(2)部署Qt编译环境,可以编译Qt代码,运行Qt程序。 因为是服务器,我这里部署Qt环境,运行Qt程序是属于控制台版本,不用Qt的GUI模块,只是用核心模块完成一些功能设计。

(3)安装、编译 ffmpeg : 支持源码编译安装ffmpeg、在线安装ffmpeg,通过ffmpeg可以完成音视频的一些开发。比如:视频转码、视频合并、视频剪切、视频特效处理。----这里用ffmpeg并不是做播放器,是在服务器上用,主要是处理视频文件。

(4)安装NFS服务器,主要是方便与本地Linux系统进行通信,编译代码,文件共享。

(5)部署开机自动启动程序:方便设置自己的程序为开机启动。

2. 部署NFS服务器

注意:在云服务器上搭建NFS服务器,需要在控制台开放端口,不然NFS的端口无法正常访问,会被拦截。

2.1 安装NFS

[root@ecs-c687-ecrs work]# yum install -y rpc-bind nfs-utils
Loaded plugins: fastestmirror
Determining fastest mirrors
base                                                                                                                                  | 3.6 kB  00:00:00     
epel                                                                                                                                  | 4.7 kB  00:00:00     
extras                                                                                                                                | 2.9 kB  00:00:00     
updates                                                                                                                               | 2.9 kB  00:00:00     
(1/7): base/7/x86_64/group_gz                                                                                                         | 153 kB  00:00:00     
(2/7): epel/x86_64/group_gz                                                                                                           |  97 kB  00:00:00     
(3/7): epel/x86_64/updateinfo                                                                                                         | 1.0 MB  00:00:00     
(4/7): base/7/x86_64/primary_db                                                                                                       | 6.1 MB  00:00:00     
(5/7): epel/x86_64/primary_db                                                                                                         | 7.0 MB  00:00:00     
(6/7): extras/7/x86_64/primary_db                                                                                                     | 250 kB  00:00:00     
(7/7): updates/7/x86_64/primary_db                                                                                                    |  17 MB  00:00:01     
No package rpc-bind available.
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.3.0-0.68.el7.2 will be installed
--> Processing Dependency: gssproxy >= 0.7.0-3 for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.68.el7.2.x86_64
--> Running transaction check
---> Package gssproxy.x86_64 0:0.7.0-30.el7_9 will be installed
--> Processing Dependency: libini_config >= 1.3.1-31 for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libverto-module-base for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libref_array.so.1(REF_ARRAY_0.1.1)(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.2.0)(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libref_array.so.1()(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libini_config.so.3()(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libcollection.so.2()(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gssproxy-0.7.0-30.el7_9.x86_64
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libnfsidmap.x86_64 0:0.25-19.el7 will be installed
---> Package quota.x86_64 1:4.01-19.el7 will be installed
--> Processing Dependency: quota-nls = 1:4.01-19.el7 for package: 1:quota-4.01-19.el7.x86_64
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-19.el7.x86_64
---> Package rpcbind.x86_64 0:0.2.0-49.el7 will be installed
--> Running transaction check
---> Package libbasicobjects.x86_64 0:0.1.1-32.el7 will be installed
---> Package libcollection.x86_64 0:0.7.0-32.el7 will be installed
---> Package libini_config.x86_64 0:1.3.1-32.el7 will be installed
--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) for package: libini_config-1.3.1-32.el7.x86_64
--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libini_config-1.3.1-32.el7.x86_64
---> Package libref_array.x86_64 0:0.1.5-32.el7 will be installed
---> Package libverto-libevent.x86_64 0:0.2.5-4.el7 will be installed
---> Package quota-nls.noarch 1:4.01-19.el7 will be installed
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed
--> Running transaction check
---> Package libpath_utils.x86_64 0:0.2.1-32.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                   Arch                           Version                                      Repository                       Size
=============================================================================================================================================================
Installing:
 nfs-utils                                 x86_64                         1:1.3.0-0.68.el7.2                           updates                         413 k
Installing for dependencies:
 gssproxy                                  x86_64                         0.7.0-30.el7_9                               updates                         111 k
 keyutils                                  x86_64                         1.5.8-3.el7                                  base                             54 k
 libbasicobjects                           x86_64                         0.1.1-32.el7                                 base                             26 k
 libcollection                             x86_64                         0.7.0-32.el7                                 base                             42 k
 libevent                                  x86_64                         2.0.21-4.el7                                 base                            214 k
 libini_config                             x86_64                         1.3.1-32.el7                                 base                             64 k
 libnfsidmap                               x86_64                         0.25-19.el7                                  base                             50 k
 libpath_utils                             x86_64                         0.2.1-32.el7                                 base                             28 k
 libref_array                              x86_64                         0.1.5-32.el7                                 base                             27 k
 libverto-libevent                         x86_64                         0.2.5-4.el7                                  base                            8.9 k
 quota                                     x86_64                         1:4.01-19.el7                                base                            179 k
 quota-nls                                 noarch                         1:4.01-19.el7                                base                             90 k
 rpcbind                                   x86_64                         0.2.0-49.el7                                 base                             60 k
 tcp_wrappers                              x86_64                         7.6-77.el7                                   base                             78 k

Transaction Summary
=============================================================================================================================================================
Install  1 Package (+14 Dependent packages)

Total download size: 1.4 M
Installed size: 4.1 M
Downloading packages:
(1/15): keyutils-1.5.8-3.el7.x86_64.rpm                                                                                               |  54 kB  00:00:00     
(2/15): libcollection-0.7.0-32.el7.x86_64.rpm                                                                                         |  42 kB  00:00:00     
(3/15): gssproxy-0.7.0-30.el7_9.x86_64.rpm                                                                                            | 111 kB  00:00:00     
(4/15): libevent-2.0.21-4.el7.x86_64.rpm                                                                                              | 214 kB  00:00:00     
(5/15): libbasicobjects-0.1.1-32.el7.x86_64.rpm                                                                                       |  26 kB  00:00:00     
(6/15): libini_config-1.3.1-32.el7.x86_64.rpm                                                                                         |  64 kB  00:00:00     
(7/15): libnfsidmap-0.25-19.el7.x86_64.rpm                                                                                            |  50 kB  00:00:00     
(8/15): libpath_utils-0.2.1-32.el7.x86_64.rpm                                                                                         |  28 kB  00:00:00     
(9/15): libref_array-0.1.5-32.el7.x86_64.rpm                                                                                          |  27 kB  00:00:00     
(10/15): libverto-libevent-0.2.5-4.el7.x86_64.rpm                                                                                     | 8.9 kB  00:00:00     
(11/15): quota-nls-4.01-19.el7.noarch.rpm                                                                                             |  90 kB  00:00:00     
(12/15): quota-4.01-19.el7.x86_64.rpm                                                                                                 | 179 kB  00:00:00     
(13/15): tcp_wrappers-7.6-77.el7.x86_64.rpm                                                                                           |  78 kB  00:00:00     
(14/15): rpcbind-0.2.0-49.el7.x86_64.rpm                                                                                              |  60 kB  00:00:00     
(15/15): nfs-utils-1.3.0-0.68.el7.2.x86_64.rpm                                                                                        | 413 kB  00:00:00     
--------------------------------------------------------------------------------------以上是关于Linux开发_CentOS7.4服务器安装NFSNGINX服务器,ffmpegQt环境的主要内容,如果未能解决你的问题,请参考以下文章

linux下配置NFS服务

centos7.4安装MFS分布式文件系统

Linux centosVMware NFS介绍NFS服务端安装配置NFS配置选项

Linux实用工具-nfs

基于Samba和NFS简单实现Mariadb服务示例

LINUX怎样安装和使用NFS服务!