Skip to content

Commit

Permalink
add redis ext
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbrainard committed Feb 29, 2012
1 parent c3f3f87 commit e9da48e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ APACHE_VERSION="2.2.19"
APACHE_PATH="apache"
PHP_VERSION="5.3.6"
PHP_PATH="php"
EXT_PATH="$PHP_PATH/ext"
REDIS_EXT="$EXT_PATH/redis.so"

BIN_DIR=$(dirname $0)
BUILD_DIR=$1
Expand Down Expand Up @@ -52,6 +54,14 @@ if [ ! -d $PHP_PATH ]; then
curl --silent --max-time 60 --location $PHP_URL | tar xz
fi

# install redis if needed
if [ ! -f $REDIS_EXT ]; then
mkdir -p $(dirname $REDIS_EXT)
REDIS_EXT_URL="https://s3.amazonaws.com/rbrainard-public/redis.so"
echo "-----> Bundling Redis extension"
curl --silent --max-time 60 --location $REDIS_EXT_URL > $REDIS_EXT
fi

# update config files
cp $LP_DIR/conf/httpd.conf $APACHE_PATH/conf
cp $LP_DIR/conf/php.ini php
Expand Down Expand Up @@ -82,4 +92,4 @@ mkdir -p $CACHE_DIR
for DIR in $APACHE_PATH $PHP_PATH ; do
rm -rf $CACHE_DIR/$DIR
cp -R $DIR $CACHE_DIR/$DIR
done
done
3 changes: 2 additions & 1 deletion conf/php.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[PHP]
$PHP_PATH/extPHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini ;
Expand Down Expand Up @@ -945,6 +945,7 @@ default_socket_timeout = 60
; Be sure to appropriately set the extension_dir directive.
;
extension=soap.so
extension=/app/php/ext/redis.so
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
Expand Down

0 comments on commit e9da48e

Please sign in to comment.