Installing Redis steps under CentOS 7

Source: Internet
Author: User
Tags download redis redis cluster install redis

1. Download Redis source code from REDIS website, this example is installed under/usr/opt

wget http://download.redis.io/releases/redis-3.2.6.tar.gz--2016-12-16 21:55:49--/http Download.redis.io/releases/redis-3.2.6.tar.gz parsing host Download.redis.io (Download.redis.io) ... 109.74.203.151 connecting Download.redis.io (Download.redis.io) |109.74.203.151|:80 ... is connected. An HTTP request has been made and is waiting for a response ... $ OK Length: 1544806 (1.5M) [application/x-gzip] saving to: "Redis-3.2.6.tar.gz"

2. Extracting source code

Tar xzf redis-3.2.6.tar.gz

3. Building Redis

CD redis-3.2.6/ [[email protected] redis-3.2.6]#   make

4. Install Tcl (must, Tcl did not install Redis test will error. If already installed, can skip)

Yum Install Tcl

5. Test Redis

[[email protected] redis-3.2.6]# make  test
...

171 Seconds-unit/obuf-limits

\o/all tests passed without errors!

Cleanup:may take some time ... Ok
MAKE[1]: Leave directory "/USR/OPT/REDIS-3.2.6/SRC"

6. When the build is complete, the server and client execution files for Redis are generated, along with the default configuration file

/usr/opt/redis-3.2.6/src/redis-server   ---redis service side
/USR/OPT/REDIS-3.2.6/SRC/REDIS-CLI   ---redis client
/usr/opt/redis-3.2.6/src/redis-sentinel  ---Redis instance monitoring management, notification and instance failover service, is the management tool for Redis cluster
/usr/opt/redis-3.2.6/redis.conf   ---redis configuration file
/usr/opt/redis-3.2.6/sentinel.conf---administration tool profile

7. For convenience, you can create a new soft link and add it to the path and copy the default profile to the new Conf directory

[[email protected] redis]# ln-s  redis-3.2.6 redis[[email protected] redis]# CD Redis

Ln-s Src/redis-server Bin/redis-server
Ln-s src/redis-cli BIN/REDIS-CLI
ln-s Src/redis-sentinel bin/redis- Sentinel
[Email protected] redis]# mkdir conf
redis]#cp redis.conf conf
CP sentinel.conf sentinel.conf

Modify the. BASHRC, add the following path and join it to path

Path= $PATH:/usr/opt/redis/bin

Reload once. BASHRC to make the path effective

. ~/.BASHRC [Email protected] redis]# echo $PATH/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/ Usr/bin:/root/bin:/usr/opt/redis/bin

8. Modify the configuration file redis.conf, find ' daemonize no ' to ' daemonize yes ', which will let Redis later set service mode to run

9. Start the Redis service in DAEM mode

[Email protected] conf]# Redis-server redis.conf

View Redis server-side processes

[Email protected] ~]$ ps-ef|grep redisroot      3755 24813  0 22:49 pts/0    redis-server *:6379

10. Start the Redis client, type the ping command, and Redis response pong, which means Redis is installed and ready to use.

[Email protected] ~]# REDIS-CLI

127.0.0.1:6379> Ping
PONG
127.0.0.1:6379>

One. Done

  

Installing Redis steps under CentOS 7

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.