使用ebextensions配置在弹性beanstalk上安装ffmpeg [英] Install ffmpeg on elastic beanstalk using ebextensions config
问题描述
我试图在amazon服务器上的弹性beanstalk实例上安装最新版本的ffmpeg。我创建了我的配置文件并添加了这些container_commands:
I'm attempting to install an up to date version of ffmpeg on an elastic beanstalk instance on amazon servers. I've created my config file and added these container_commands:
container_commands:
01-ffmpeg:
command: wget -O/usr/local/bin/ffmpeg http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz
leader_only: false
02-ffmpeg:
command: tar -xzf /usr/local/bin/ffmpeg
leader_only: false
03-ffmpeg:
command: ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
leader_only: false
命令01和03似乎工作完美,但02似乎不工作,所以ffmpeg不解压缩。任何想法可能是什么问题?
Command 01 and 03 seems to work perfectly but 02 doesn't seem to work so ffmpeg doesn't unzip. Any ideas what the issue might be?
谢谢,
Helen
Thanks, Helen
推荐答案
亚马逊的一个善良的人帮助我,并发送给我这个配置文件的工作,希望有些其他人会发现这是有用的:
A kind person at Amazon helped me out and sent me this config file that works, hopefully some other people will find this useful:
packages:
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz"
02-mkdir:
command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
03-tar:
command: "tar xvf /tmp/ffmpeg.tar.xz -C /opt/ffmpeg"
04-ln:
command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -s /opt/ffmpeg/ffmpeg-3.3.1-64bit-static/ffmpeg /usr/bin/ffmpeg; fi"
05-ln:
command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -s /opt/ffmpeg/ffmpeg-3.3.1-64bit-static/ffprobe /usr/bin/ffprobe; fi"
06-pecl:
command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"
编辑:更改了安装更官方静态构建与FFMPEG网站链接,此外,Gusari之前的静态构建似乎不再可用。
Edit: Changed the commands to install a "more official" static build linked from the FFMPEG web site. Also, the former static build from Gusari does not seem available anymore.
这篇关于使用ebextensions配置在弹性beanstalk上安装ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!