If you keep the env settings saved, you will always have the same EC2 settings when executing your app.
I prefer to do this kind of customizing using code (you can do this using the AWS Console too). So, create a file in your source root, with the following path:
.ebextensions/php-modules.config with these contents (ps: I'm using this in production with no problem):
commands:
01_redis_install:
# run this command from /tmp directory
cwd: /tmp
# don't run the command if phpredis is already installed (file /etc/php.d/redis.ini exists)
test: '[ ! -f /etc/php.d/redis.ini ] && echo "redis not installed"'
# executed only if test command succeeds
command: |
wget https://github.com/nicolasff/phpredis/zipball/master -O phpredis.zip \
&& unzip -o phpredis.zip \
&& cd phpredis-phpredis-* \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& echo extension=redis.so > /etc/php.d/redis.ini
This is for install php-redis, but you can use the same approach to geoip as well.
For more information: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP.container.html#php-configuration-namespace
Source of the example: http://qpleple.com/install-phpredis-on-amazon-beanstalk/