Installing Redis under Linux

Source: Internet
Author: User
Tags download redis

1. Download Redis source package on official website

http://redis.io/can be used wget http://download.redis.io/releases/redis-3.2.3.tar.gz

2. Unzip the source package

Tar zxvf redis-3.2.3.tar.gz

Renamed MV redis-3.2.3 Redis

3. Installation

Make MALLOC=LIBC (if GCC is not installed, install GCC with yum installed gcc)

4. Make Redis a service

Copy a startup script

Cp/usr/local/redis/utils/redis_init_script/etc/rc.d/init.d/redis

Vi/etc/rc.d/init.d/redis

  

  

Save after modification

. /etc/rc.d/init.d/redis

Copy redis.config file

Mkdir/etc/redis

Cp/usr/local/redis/redis.config/etc/redis/6379.conf

To modify a bound IP address

Vi/etc/redis/6379.conf

/bind Find the binding address

Bind 192.168.1.187

Add Service

Cd/etc/rc.d/init.d

Chkconfig--add Redis

Start Redis

Service Redis Start

5. Add Environment variables

echo "Export path=" \ $PATH:/usr/local/redis/src "" >>/etc/profile

So you can use REDIS-CLI to connect to Redis.

Installing Redis under Linux

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.