Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running elastic beanstalk on AWs. using 64bit unix php 5.3.

I am wanting to install mongo driver so php will talk to mongo.

the usual command is:

sudo pecl install mongo

According to AWS support, the way to do it is via a .config file in .ebextensions. I cont seem to figure out the format that it needs to be in order to run a script to do it.

the script i am writing looks like this:

sudo pecl install mongo

and the .config file I have looks like:

    command:        bash .ebextensions/mongo.sh

I must be doing it quite wrong because each time I try to deploy, it errors on trying to run the command.

The end result I want it to have mongo php extension installed using the .config method

Thanks for your help

share|improve this question

1 Answer 1

I accomplished this creating a config file with this content:

    command: pecl install mongo
    ignoreErrors: true

And it worked, I am just wondering if elasticbeanstalk is installing the extension every time I deploy a new version of my application. I know I can test if the extension is already installed but I'm not how to do that.

share|improve this answer
yes it will try to, I got around that by writing a file to the server after successfully installing it, and then on each deployment it just checks if the file exists and if so, ignore the install command. –  Charlie Smith Jul 11 '13 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.