Go to Redis official website (http://redis.io/download) Download the installation package to the local folder, such as in the Mac Application Folder (/applications/), in the terminal into the Redis folder.
You need to compile to run
The Codis is made up of four parts:Codis Proxy (codis-proxy) proxy server to do the request forwarding, codis-proxy itself implementation of the Redis protocol, codis-proxy itself is stateless. You can perform multipleCodis Dashboard (codis-config)
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,
Someone asked me, Redis multiple databases, is not the start of multiple Redis processes, listening to different ports. At some level, this can be considered, but not recommended.
1,redis Database
The number of Redis databases is set dead in the
Redis configuration parameters, very much, the following list of some redis commonly used parameter configuration, as well as Chinese comments.
/********************************* General *********************************/Whether to run as a
CommunicationAfter initialization is complete, Sentinel will actively communicate with master, slave, to obtain their information.Get Primary Server informationFirst, Sentinel will establish two connections with master, which are command connections
# Redis configuration file
# When you need to configure the memory size in the configuration, you can use similar formats such as 1k, 5GB, 4M, which are converted as follows (case-insensitive)## 1k =>1000 bytes# 1kb => 1024 bytes# 1m => 1000000
First, the installation of Redis-server
Since I am using the Ubuntu system for my current web machine, here is an example of Ubuntu, which can be installed directly using apt source redis-server
$ sudo apt-get install Redis-serverAfter the
Redis is a high-performance key-value database. The emergence of Redis, to a large extent, compensates for the shortage of such key/value storage in memcached, and in some cases can complement the relational database well. It provides a
Redis is an open source, using ANSI C language to write, support network, can be based on memory can also be persistent log-type, Key-value database
Redis use of NoSQL database, the biggest feature is no fixed mode, that is, the format of the table
As a result of business needs, 6 servers are configured today with Redis, 4 as Master and 2 as slave. One main one from, master-slave structure.According to the division of business, the number of Redis services mounted by different machines is also
The example in this article describes the Linux installation Redis extension of Php method. Share to everyone for your reference, specific as follows:
Note: Directory Permissions CHOMD 777-r
1. Installation Redis
Download:
0. What is Redis
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
1. Compare with other user state save scheme
A String type
First use the Start server process:
Redis-server.exe
1. Set
The value of the SET key corresponds to the string type.
Example: Inserts a record of a data type string into the Redis database.
To enter a command on the client:
Redis is a database of key-value pairs with 5 of the primary data types :String type (string), hash type (hash), list type (lists), collection type (set), Ordered collection type (zset)One: String typeThe string type is the most basic type of redis,
3.0 the changes are relatively large. session supports redis, memcache, files, and database. This is the simplest. Here we will talk about how to store sessions using databases and redis.First, because the manual is not updated, the manual describes
Phpinfo, you can see the session storage, you can use files user memcache redis, the advantage of using the database to store sessions is that compared with the file storage, the speed is faster and the performance is better in a large number of
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.