说明:此处直接使用脚本安装即可
安装依赖
yum -y install vim openssh openssh-devel openssl openssl-devel gcc wget lrzsz telnet openssh-clients rsync unzip mlocate tcpdump iotop sysstat ntpdate gcc-c++ strace bc lsof dos2unix perf net-tools nfs-utils rpcbind inotify-tools nc git ntp ethtool
安装脚本
#!/bin/bash TODAY_TIME=$(date +%Y%m%d) MKDIR="/root/backup_${TODAY_TIME}" mkdir ${MKDIR} echo "###################### install yasm ###########################" cd ${MKDIR} curl -# -O http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz; tar -xf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure make && make install echo "###################### yasm end ###########################" echo "###################### install fdk-aac ########################" cd ${MKDIR} curl -# -O https://downloads.sourceforge.net/opencore-amr/fdk-aac-2.0.2.tar.gz; tar -xf fdk-aac-2.0.2.tar.gz cd fdk-aac-2.0.2 ./configure make && make install echo "###################### x264-snapshot ##########################" cd ${MKDIR} curl -# -O http://download.videolan.org/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2; tar -xf x264-snapshot-20191217-2245-stable.tar.bz2 cd x264-snapshot-20191217-2245-stable mkdir -p /usr/local/snapshot/x264 ./configure --prefix=/usr/local/snapshot/x264 \ --enable-shared \ --enable-static \ --disable-asm make && make install echo 'export PATH=/usr/local/snapshot/x264/bin:$PATH' >> /etc/profile.d/snapshot.sh echo 'export PATH=/usr/local/snapshot/x264/include:$PATH' >> /etc/profile.d/snapshot.sh echo 'export PATH=/usr/local/snapshot/x264/lib:$PATH' >> /etc/profile.d/snapshot.sh source /etc/profile.d/snapshot.sh echo '/usr/local/snapshot/x264/lib' >> /etc/ld.so.conf ldconfig echo 'export PKG_CONFIG_PATH=/usr/local/snapshot/x264/lib/pkgconfig:$PKG_CONFIG_PATH' >> /etc/profile source /etc/profile echo $PKG_CONFIG_PATH echo "#################### x264-snapshot end ########################" echo "###################### install ffmpeg #########################" cd ${MKDIR} curl -# -O http://www.ffmpeg.org/releases/ffmpeg-4.3.4.tar.gz; tar -xf ffmpeg-4.3.4.tar.gz mkdir /usr/local/ffmpeg cd ffmpeg-4.3.4 ./configure --enable-shared \ --enable-swscale \ --enable-gpl \ --enable-nonfree \ --enable-pic \ --prefix=/usr/local/ffmpeg \ --enable-postproc \ --enable-pthreads \ --enable-static \ --enable-libx264 \ --enable-libfdk-aac make && make install echo '/usr/local/ffmpeg/lib' >> /etc/ld.so.conf.d/ffmpeg.conf echo '/usr/local/lib' >> /etc/ld.so.conf ldconfig ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ ln -s /usr/local/ffmpeg/bin/ffprobe /usr/local/bin/ echo 'export PATH=/usr/local/ffmpeg/bin:$PATH' >> /etc/profile source /etc/profile echo "###################### install end ###########################" ffmpeg -version
标签:ffmpeg,--,安装,echo,snapshot,usr,local From: https://www.cnblogs.com/fanrui/p/17384156.html