Php 在EC2上安装mod_security
我正在尝试使用yum安装mod_security安装mod_security,但出现此错误Php 在EC2上安装mod_security,php,amazon-ec2,mod-security,Php,Amazon Ec2,Mod Security,我正在尝试使用yum安装mod_security安装mod_security,但出现此错误 Loaded plugins: priorities, update-motd, upgrade-helper amzn-main/latest | 2.1 kB 00:00 amzn-updates/latest
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package mod_security.x86_64 0:2.7.3-3.23.amzn1 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_security-2.7.3-3.23.amzn1.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.27-1.2.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.27-1.2.amzn1 for package: httpd-2.2.27-1.2.amzn1.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.27-1.2.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.9-1.55.amzn1.x86_64 conflicts httpd < 2.4.9
--> Processing Conflict: httpd24-tools-2.4.9-1.55.amzn1.x86_64 conflicts httpd-tools < 2.4.9
--> Finished Dependency Resolution
Error: httpd24 conflicts with httpd-2.2.27-1.2.amzn1.x86_64
Error: httpd24-tools conflicts with httpd-tools-2.2.27-1.2.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
加载的插件:优先级、更新motd、升级助手
amzn主/最新版本| 2.1KB 00:00
amzn更新/最新版本| 2.3KB 00:00
解决依赖关系
-->运行事务检查
--->将安装软件包mod_security.x86_64 0:2.7.3-3.23.amzn1
-->包的处理依赖项:httpd mmn=20051115:mod_security-2.7.3-3.23.amzn1.x86_64
-->运行事务检查
--->将安装程序包httpd.x86_64 0:2.2.27-1.2.amzn1
-->处理依赖项:httpd tools=2.2.27-1.2.amzn1,用于包:httpd-2.2.27-1.2.amzn1.x8664
-->运行事务检查
--->将安装程序包httpd-tools.x86_64 0:2.2.27-1.2.amzn1
-->处理冲突:httpd24-2.4.9-1.55.amzn1.x86_64冲突httpd<2.4.9
-->处理冲突:httpd24-tools-2.4.9-1.55.amzn1.x86_64冲突httpd-tools<2.4.9
-->已完成依赖项解析
错误:httpd24与httpd-2.2.27-1.2.amzn1.x86_64冲突
错误:httpd24工具与httpd-tools-2.2.27-1.2.amzn1.x86_64冲突
您可以尝试使用--skip break来解决这个问题
您可以尝试运行:rpm-Va--nofiles--nodigest
我已经删除了httpd24-tools-2.4.9-1.55.amzn1.x86_64和httpd24-2.4.9-1.55。amzn1.x86_64得到了相同的错误
使用以下命令删除apache&tools版本24和27
yum remove httpd httpd-tools
然后能够成功安装,没有任何版本冲突
检查一次
您可以运行以下命令:
# yum install mod_security
mod_安全配置文件:
1) /etc/httpd/conf.d/mod_security.conf—mod_security Apache模块的主配置文件
2) /etc/httpd/modsecurity.d/-mod_security Apache的所有其他配置文件
3) /etc/httpd/modsecurity.d/modsecurity_crs_10_config.conf-此文件中包含的配置应在部署之前根据您的特定需求进行定制
4) /var/log/httpd/modsec_debug.log-使用调试消息调试mod_安全规则和其他问题
5) /var/log/httpd/modsec_audit.log-触发ModSecurity事件(检测到)或serer错误的所有请求都会被记录(“RelevantOnly”)并记录到此文件中
有关如何设置CentoOS的更多信息,请参阅本文:
然后
假设这是AmazonLinux。亚马逊Linux的哪个版本?@Rico Amazon Linux AMI x86_64 PV EBStry
yum安装mod24_security.x86_64
如果我删除那些软件包php56 php56 devel php56 jsonc devel
也将被删除。。。解决办法是什么?再次尝试安装它们会带来冲突,但我没有这样做yum install mod24\u security.x86\u 64
sudo yum install mod24_security.x86_64
sudo service httpd restart