Elasticache Redis For Magento


Private Dock

Redis is used for magento cache storage which will lead to better web

Login Server (Amazon Linux):

#yum install git
#Installing phpredis PHP Extension for Redis
#git clone git://github.com/owlient/phpredis
#cd phpredis
#phpize
#./configure
#make && make install

Enabling phpredis

#vim /etc/php.d/redis.ini
extension=redis.so

Get Colins Magento Redis code

#bash < <(wget -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer)
#cd /var/www/magento
#modman init
#modman clone git://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git

Configuring it with Magento:

#vim /var/www/magento/app/etc/local.xml

<global>
...

<cache>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>example-redis.0001.cache.amazonaws.com</server>
<port>6379</port>
<database>0</database>
<force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
<automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
<compress_data>1</compress_data>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_tags>1</compress_tags>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_threshold>20480</compress_threshold>  <!-- Strings below this size will not be compressed -->
<compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->
</backend_options>
</cache>

...
</global>

Restart Apache

#rm -rf /var/www/magento/var/cache/*

There should not be any files inside the above directory…

View original post 52 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s