I study Redis or because I want to know more about the usage and architecture of Redis this series will start with how to use Redis to cut in, followed by the data structure of REDIS, this column is all in the MAC environment to explain
Redis's good: support for data persistence not only supports simple key-value but also supports List,set,zset,hash and other storage methods Redis supports master-slave backup Master-slave learning URL: http://www.runoob.com /redis/redis-conf.html redis Download and installation
$ wget http://download.redis.io/releases/redis-2.8.17.tar.gz
$ tar xzf redis-2.8. 17.tar. Gz
$ cd redis-2.8. $ make
Make is a Redis installation and can then be started on the client and server in the SRC directory
After make the redis-2.8.17 directory will appear after the compiled Redis service program Redis-server, as well as the client program for testing REDIS-CLI, two programs located in the installation directory SRC directory:
Start the Redis service below.
$ cd src
$./redis-server
Note this way of starting Redis is using the default configuration. You can also tell Redis to start with the following command using the specified configuration file through the startup parameters.
$ cd src
$./redis-server redis.conf
Screenshot after startup redis.conf is a default configuration file. We can use our own configuration files as needed.
Once the Redis service process is started, you can use the test client program REDIS-CLI to interact with the Redis service. For example: $ cd src
$./REDIS-CLI
Redis > Set foo bar
Ok
Redis > Get foo "bar"