Linux installation Redis

Source: Internet
Author: User

1. Install the compilation environment

Redis is developed in the C language.

Installing Redis requires a C language compilation environment. If no GCC is required to be installed online. Yum Install gcc-c++

2. Installation steps:

The first step: the Redis source package is uploaded to the Linux system/home/redis-3.0.0.tar.gz.

The second step: Unzip the Redis. Tar zvxf redis-3.0.0.tar.gz

Step three: Compile. Enter the Redis source directory. Make

Fourth step: Install. Make install Prefix=/usr/local/redis

The prefix parameter specifies the installation directory for Redis. General software installed in/usr directory

3. Start Redis:
Cd/usr/local/redis/bin

Enter:./redis-server to start the Redis foreground program

If you want to start the Redis daemon:

Modify the/usr/local/redis/bin redis.conf file Daemonize No to daemonize Yes

Input:./redis-server redis.conf started.

Want to see if it started successfully

4. Connect to Redis:

[Email protected] bin]#./redis-cli

The default connection localhost runs on the 6379 Port Redis service.

[Email protected] bin]#/redis-cli-h 192.168.25.153-p 6379

-H: The address of the connected server

-P: Port number of the service

Close Redis:[[email protected] bin]#./REDIS-CLI shutdown

Linux installation Redis

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.