大网数据广告活动
服务器运维问答

Installing from EPEL on Amazon EC2

· 52CE 我爱测

I am trying to install fail2ban on our Amazon EC2 Linux AMI (CentOS). I know that fail2ban is in the EPEL so I have done the following: wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh …

问题原文

原帖链接 · williamsdb · CC BY-SA 3.0

I am trying to install fail2ban on our Amazon EC2 Linux AMI (CentOS). I know that fail2ban is in the EPEL so I have done the following:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release*rpm

However, when I do that I get the following message:

package epel-release-6-8.9.amzn1.noarch (which is newer than epel-release-6-8.noarch) is already installed

Which implies to me that EPEL is already available but if I do:

sudo yum install fail2ban

I get:

Loaded plugins: priorities, security, update-motd, upgrade-helper
amzn-main                                                                                   | 2.1 kB     00:00
amzn-updates                                                                                | 2.3 kB     00:00
Setting up Install Process
No package fail2ban available.
Error: Nothing to do

I assume that I am misunderstanding something but how can I install from EPEL?

EDIT: I have just done the following and found that the repo is not enabled:

yum repolist all

SO how do I enable a repo on EC2?

社区高分解答

原帖链接 · Amit Naidu · CC BY-SA 4.0

Update for Amazon Linux 2:

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Or,

sudo amazon-linux-extras install epel -y

Or,

sudo amazon-linux-extras enable epel
sudo yum install -y epel-release

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-04-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。