You should not SSH into Elastic Beanstalk to install php-devel
and mongo
. Those settings will disappear when your EB environment scales in/out or server crash by accident.
Try to use Configuration File to customize your EB Environment.
Updated: add a configuration file example for PHP 5.4 on 64bit Amazon Linux 2013.09
- Create an .ebextensions directory in the top-level of your source bundle.
- Create a configuration file,
/your_app/.ebextensions/01install_mongo_driver.config
.
Type the following inside the configuration file 01install_mongo_driver.config
to install php mongodb driver.
commands:
install_mongo_driver_command:
command: pecl install mongo
Because PHP 5.4 on 64bit Amazon Linux 2013.09 AMI already contained php-devel
, so you won't install it manually.