部署后,我需要在我的AWS Beanstalk上安装sshpass。
我创建了一个新的克隆来检查是否可以从ssh shell命令行执行此操作,并发现除非我指定epel存储库,否则它将找不到该软件包:
$ sudo yum -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package sshpass available.
Error: Nothing to do
但是这有效:
$ sudo yum --enablerepo=epel -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
1070 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package sshpass.x86_64 0:1.06-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================
Installing:
sshpass x86_64 1.06-1.el6 epel 20 k
Transaction Summary
==================================================================================================================================================================
Install 1 Package
Total download size: 20 k
Installed size: 34 k
Downloading packages:
sshpass-1.06-1.el6.x86_64.rpm | 20 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : sshpass-1.06-1.el6.x86_64 1/1
Verifying : sshpass-1.06-1.el6.x86_64 1/1
Installed:
sshpass.x86_64 0:1.06-1.el6
Complete!
那么我将如何在.ebextensions / -1-packages / install-packages.config文件中执行此操作?语法在AWS示例中定义如下:
packages:
yum:
libmemcached: []
ruby-devel: []
gcc: []
rpm:
epel: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rubygems:
chef: '0.10.2'
但是我不确定该如何在我只想告诉它使用epel repo的情况下实现该功能>
packages: yum: ... ... sshpass: []
我猜测以上内容不会自动使它使用epel存储库?
部署后,我需要在我的AWS Beanstalk上安装sshpass。我创建了一个新的克隆,以检查是否可以从ssh shell命令行执行此操作,并发现除非指定epel存储库,否则...
也许有更好的方法,但是可行: