我想配置我的AWS Elastic Beanstalk以与mongo配合使用,只需安装PHP的mongo驱动程序并更新php.ini文件即可。
通常情况下,我会通过ssh连接到EC2并运行:
sudo pecl install mongo
但这需要使用自定义AMI,这并不是最好的方法。
最好使用配置文件来将所需软件安装到标准AMI上。
因此,我已经完成了以下步骤: 创建目录.ebextensions 创建文件mongo.config
在其中放入以下内容:
packages:
pecl: install mongo
然而,在部署时,我遇到了以下错误:
"option_settings" in one of the configuration files failed validation. More details to follow.
并且。
'null' values are not allowed in templates
我想知道安装mongo扩展需要如何布置配置文件?
我已经阅读了这里的信息:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html,但我不太明白如何完成这个具体任务。
希望得到帮助,谢谢! :)