tutorial on installing the Redis database under Mac/linux

Source: Internet
Author: User
Tags redis install redis redis server
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:
Make
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

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.