编译安装ffmpeg
1 软件包
ffmpeg工具环境.zip下载地址:
https://download.csdn.net/download/Zhuge_Dan/85364065
2 基础配置
2.1 关闭SELinux
[root@FFMPEG ~]# setenforce 0
[root@FFMPEG ~]# vi /etc/selinux/config
SELINUX=disabled #将SELINUX设置为disabled
[root@FFMPEG ~]# getenforce
Permissive
2.2 关闭防火墙或开放需要的业务端口
[root@FFMPEG ~]# systemctl stop firewalld #关闭防火墙
[root@FFMPEG ~]# systemctl disable firewalld #禁止防火墙开机自启
2.3 调整max_open_files
[root@FFMPEG ~]# echo '* soft nofile 65535' >> /etc/security/limits.conf
[root@FFMPEG ~]# echo '* hard nofile 65535' >> /etc/security/limits.conf
[root@FFMPEG ~]# cat /etc/security/limits.conf | tail -2
* soft nofile 65535
* hard nofile 65535
[root@FFMPEG ~]# echo 'ulimit -SHn 65535' >> /etc/rc.d/rc.local
[root@FFMPEG ~]# cat /etc/rc.d/rc.local | tail -1
ulimit -SHn 65535
[root@FFMPEG ~]# chmod +x /etc/rc.d/rc.local #为rc.local增加可执行权限
2.4 重启检查SELinux、firewalld和open files
[root@FFMPEG ~]# reboot
[root@FFMPEG ~]# getenforce #查看SELinux是否关闭成功
Disabled #关闭成功
[root@FFMPEG ~]# systemctl status firewalld #查看防火墙状态
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead) #防火墙已关闭
Docs: man:firewalld(1)
[root@FFMPEG ~]# systemctl is-enabled firewalld #查看防火墙是否开机自启
disabled #防火墙已禁止开机自启
[root@FFMPEG ~]# ulimit -a | grep open
ope