Install redis magento Ubuntu

Install redis magento Ubuntu
Facebooktwitterredditpinterestlinkedinmail

Install redis magento Ubuntu

Install and configure redis for magento backend and fullpage caching which will improve your magento store performance and load faster.

Download latest redis package.

sudo wget http://download.redis.io/releases/redis-3.0.2.tar.gz
sudo tar xzf redis-3.0.2.tar.gz
cd redis-3.0.2
sudo make
sudo make test
sudo make install
cd utils
sudo install_server.sh

Start and stop redis service

sudo service redis_6379 start
sudo service redis_6379 stop

Setting redis in magento:
By Defualt latest magento version is come with redis library and session module.

You just need to download the cache backend module from the below mentioned github link

https://github.com/colinmollenhour/Cm_Cache_Backend_Redis

After downloading extract the files and copy the cache folder into magento/app/code/community/Cm/

After that add below mentioned code in magento magento/etc/local.xml file in global section.

<!--Start caching-->
<cache>
  <backend>Cm_Cache_Backend_Redis</backend>
  <backend_options>
	<server>127.0.0.1</server>
	<port>6379</port>
	<persistent></persistent>
	<database>0</database>
	<password></password>
	<force_standalone>0</force_standalone>
	<connect_retries>1</connect_retries>
	<read_timeout>10</read_timeout>
	<automatic_cleaning_factor>0</automatic_cleaning_factor>
	<compress_data>1</compress_data>
	<compress_tags>1</compress_tags>
	<compress_threshold>20480</compress_threshold>
	<compression_lib>gzip</compression_lib>
	<use_lua>0</use_lua>
  </backend_options>
</cache>
<full_page_cache>
  <backend>Cm_Cache_Backend_Redis</backend>
  <backend_options>
	<server>127.0.0.1</server>
	<port>6379</port>
	<persistent></persistent>
	<database>1</database>
	<password></password>
	<force_standalone>0</force_standalone>
	<connect_retries>1</connect_retries>
	<lifetimelimit>57600</lifetimelimit>
	<compress_data>0</compress_data>
  </backend_options>
</full_page_cache>
<!--End caching-->

Flush magento cache.

After that login with ssh in your server and type below mentioned command.

redis-cli
127.0.0.1:6379>keys *

You will see magento madules are caching there.

Enjoy !!!

Facebooktwitterredditpinterestlinkedinmail