欢迎各位兄弟 发布技术文章
这里的技术是共享的
1 | sudo apt-get install redis-server |
1 2 3 4 5 6 7 8 | sudo apt-get install build-essential sudo apt-get install tcl8.5 wget <a href= "http://download.redis.io/releases/redis-2.8.11.tar.gz" title= "http://download.redis.io/releases/redis-2.8.11.tar.gz" >http: //download .redis.io /releases/redis-2 .8.11. tar .gz< /a > tar -zxvf redis-2.8.11 cd redis-2.8.11 make sudo make test #安装前测试一下 sudo make install |
1 | sudo . /utils/install_server .sh |
1 | vi /etc/redis/redis .conf |
1 | pecl install redis |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | // Required configurations. $conf [ 'lock_inc' ] = 'sites/all/modules/contrib/redis/redis.lock.inc' ; $conf [ 'cache_backends' ][] = 'sites/all/modules/contrib/redis/redis.autoload.inc' ; $conf [ 'redis_client_interface' ] = 'PhpRedis' ; $conf [ 'redis_client_base' ] = 2; $conf [ 'redis_client_host' ] = '192.168.1.109' ; //换成你的IP $conf [ 'redis_client_port' ] = '6379' ; $conf [ 'redis_client_password' ] = 'yourpassword' ; // $conf['cache_prefix'] = 'mysite_'; // Optional not redis specific. // $conf['cache_lifetime'] = 0; // $conf['page_cache_max_age'] = 0; // $conf['page_cache_maximum_age'] = 0; $conf [ 'page_cache_invoke_hooks' ] = TRUE; $conf [ 'page_cache_without_database' ] = FALSE; // Cache bins. $conf [ 'cache_default_class' ] = 'Redis_Cache' ; $conf [ 'cache_bootstrap' ] = 'Redis_Cache' ; $conf [ 'cache_class_cache' ] = 'Redis_Cache' ; $conf [ 'cache_class_cache_menu' ] = 'Redis_Cache' ; $conf [ 'cache_class_cache_block' ] = 'Redis_Cache' ; $conf [ 'cache_class_cache_views' ] = 'Redis_Cache' ; $conf [ 'cache_class_cache_views_data' ] = 'Redis_Cache' ; $conf [ 'cache_field' ] = 'Redis_Cache' ; $conf [ 'cache_filter' ] = 'Redis_Cache' ; $conf [ 'cache_image' ] = 'Redis_Cache' ; $conf [ 'cache_libraries' ] = 'Redis_Cache' ; $conf [ 'cache_metatag' ] = 'Redis_Cache' ; //$conf['cache_search_api_solr'] = 'Redis_Cache'; // Always Database Cache. $conf [ 'cache_class_cache_form' ] = 'DrupalDatabaseCache' ; // Entity Cache. if ( file_exists ( 'sites/all/modules/contrib/entitycache/entitycache.info' )) { $conf [ 'cache_entity_node' ] = 'Redis_Cache' ; $conf [ 'cache_entity_fieldable_panels_pane' ] = 'Redis_Cache' ; $conf [ 'cache_entity_file' ] = 'Redis_Cache' ; $conf [ 'cache_entity_taxonomy_term' ] = 'Redis_Cache' ; $conf [ 'cache_entity_taxonomy_vocabulary' ] = 'Redis_Cache' ; } |