Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS 6.6 install single node Redis 3.0.3

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Download redis-3.0.3 and extract it

# cd / usr/local

# wget http://download.redis.io/releases/redis-3.0.3.tar.gz

# tar-zxvf redis-3.0.3.tar.gz

2. Install redis

# cd redis-3.0.3

# make

# make test

A missing tcl error may be reported here

Solution: download and install tcl

# cd / usr/local/

# wget http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz

# tar-zxvf tcl8.5.10-src.tar.gz

# cd / tcl8.5.10-src/unix

#. / configure

# make

# make install

Then re-make test the redis

# cd / usr/local/redis3.0.3/

# make test

After executing make install, it is found that six executable files related to redis have been generated under / usr/local/bin/

# make install

# ls / usr/local/bin/

Redis-benchmark redis-check-dump redis-sentinel tclsh8.5

Redis-check-aof redis-cli redis-server

These six executable files are also available under / usr/local/redis-3.0.3/src/. The function of make install should be to copy these six files from / usr/local/redis-3.0.3/src/ to / usr/local/bin/.

The functions of some files are as follows

Daemon launcher for redis-server:Redis server

Redis-cli:Redis client command line operation tool. You can also use telnet to operate according to its plain text protocol

Redis-benchmark:Redis performance testing tool to test the read and write performance of Redis on your system and your configuration.

3. Modify the configuration file

# cd / usr/local/redis-3.0.3/

# vi redis.conf

Generally, you need to change daemonize no to daemonize yes, and others need to be modified.

4. Start redis

# redis-server redis.conf

5. Check whether it is started.

# netstat-antp | grep redis

Tcp 0 0 0.0.0.0 6379 0.0.0.015 * LISTEN 78499/redis-server

Tcp 0 0: 6379: * LISTEN 78499/redis-server

The result shown above indicates that redis starts normally.

6. Testing

# redis-cli

127.0.0.1 purl 6379 > ping

PONG

127.0.0.1 purl 6379 > set name feicuisenlin

OK

127.0.0.1 purl 6379 > get name

"feicuisenlin"

127.0.0.1purl 6379 >

The results shown above indicate that the redis is deployed successfully.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report