Need appropriate API (Jedis-2.1.0.jar)
Copy Code code as follows:
package Com.redis;
Import Redis.clients.jedis.Jedis;
Public class Client { public void GetCache (String key) { Jedis Jedis = new Jedis ("12
Redis Introduction
Redis is an open source, with the ANSI C language, support network, can be based on memory can also be persistent log-type, Key-value database, and provide a variety of language APIs, including Java,c/c++,c#,php,javascript,perl,
Unlike the list type in the previous article, duplicate elements are not allowed in the set collection, so the set type can quickly determine whether an element exists.
Application scene: Take out two QQ number in the common number of friends, to
Redis and memcached Two kinds of caching, personally feel redis better use, because it not only provides a wealth of data types, but also to ensure the durability of the data, the following is a simple introduction to the Redis of several commonly
Redis installation is not required./configure, this is better, simple!
The code is as follows
Copy Code
#下载wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz#解压TAR-ZXVF
This article for everyone to share the Redis installation tutorials for your reference, the specific contents are as follows
1. Install Redis
After downloading through the above path to the specific folder, extract the following files:
Switch
In the work, often useful to the queue scene, the more common use of RABBITMQ these professional components, official website address is:http://www.rabbitmq.com, The important thing is that the official has. NET clients, but if not familiar with the
Redis is one of the more popular NoSQL databases, and the following records the Redis installation process:
1. Installation Environment Introduction:Redis version:redis-3.0.1Linux version: Red Hat Enterprise Linux Workstation Release 7.0 (MAIPO)
2.
Redis's author, Salvatore Sanfilippo, once compared these two types of memory-based data storage systems:
1.Redis supports server-side data operations: Redis has more data structures and supports richer data operations than memcached, usually in
Note: C # in the call Redis is not to use the Servicestack.redis-driven version 4.0, because this version has been commercialized, there will be 6,000 data per hour limit
1. Reference driver
Copy Code code as follows:
Using
Redis differs in many ways from other database solutions: It uses memory to provide primary storage support, and uses hard disks for persistent storage; its data model is unique and single-threaded. Another big difference is that you can use Redis
1, log in as root permissions2, the next down input command, Apt-getinstall Redis-server, as shown:3, after the installation is completed, the Redis server will automatically start, we check the Redis server program, the implementation of
Recently, because of the Jedis 2.1.0 interface problems, the upgrade version of the version, the result of a strange problem; often can start normally, often appear jedispool initialization java.lang.IllegalArgumentException: Hostname can ' t be
Redis provides a flexible way of querying data, and the most bull is the search for key to support regular expressions.
Jedis.keys ("*") means search for all keyJedis.keys ("abc*") indicates the search for key data beginning with ABC
The key is
First, to build the Redis environment 3.2.1Redis GitHubafter download, extract the following directory structure directly650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8D/BB/wKiom1ioSPTRugkPAACi-NO7_Jw034.jpg-wh_500x0-wm_ 3-wmp_4-s_13232
Redis Server deployment: Is that clear??Code Usage SectionAssemblies that need to be referenced: StackExchange.Redis.StrongName.dllInterface for Redis connections Public Interface iredisconnectionwrapper:idisposable { idatabase
1. Use the Phpinfo () function to view PHP version information, which will determine the extension file version2. According to the PHP version number, the compiler version number and CPU architecture,Choose Php_redis-2.2.5-5.5-ts-vc11-x86.zip and
Redis Cluster Deployment documentation (CENTOS6 System)(To make the cluster work at least 3 primary nodes, here we will create 6 Redis nodes, of which three are the primary node, three are slave nodes, the corresponding Redis node IP and port
I. php extension dll download address for redis installationHttps://github.com/phpredis/phpredis/downloadsMy local name is php5.4 Thread Safety enabledCompiler MSVC9 (Visual C ++ 2008)Architecture x86After adding php. ini extension = php_redis.dll,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service