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 Mac-side Redis, and the compilation method is:
into the SRC folder, we can see the makefile file entered at the Mac Terminal:
This command, visible terminal scrolling display of the compilation information, wait a moment on the compilation completed. Compilation is the compilation of a number of source files into binary executable programs, as with Windows EXE.
After compiling, there will be several more files in the Src folder, two of which are important, one is redis-server, the other is REDIS-CLI, which is the same as the Windows client, Redis server and client.
First of all, to run the Redis server, directly in the SRC directory, in the Mac terminal input./redis-server,mac The Redis server is launched. This time to create a new terminal window, also in the SRC directory input./redis-cli into the client.
The
Tests the Redis command at the end of the terminal OK.
installation of Redis under Linux
You want to install Redis to this directory
/usr/local/redis
You want to download the installation package to this directory
/usr/local/src
Then the installation process directive is as follows:
$ mkdir/usr/local/redis
$ cd/usr/local/src
$ wget http:// redis.googlecode.com/files/redis-2.6.14.tar.gz
$ tar xzf redis-2.6.14.tar.gz
$ ln-s redis-2.6.14 redis #建立一个链接
$ cd redis
$ make Prefi X=/usr/local/redis Install #安装到指定目录中
Note the last line above, we specified the installed directory through prefix. If make fails, typically you do not have GCC installed in your system, you can install it via yum:
Yum install gcc
After the installation is complete, continue to do so.
After the installation Redis succeeds, you will be able to see a bin directory in/usr/local/redis, which includes the following files:
redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server