A Preliminary Study of Redis - Redis Installation

Official website address: https://redis.io/download

The latest version is 4.0, here I am under 3.2

Use the rz command to upload Redis to a Linux system

First, determine whether gcc is installed on Linux. If not, use yum install gcc-c++ to install

The following error message appears during installation

Use rm -f /var/run/yum.pid to solve

Unzip with tar -zxvf redis-3.2.11_.tar.gz

Enter the decompressed directory and use the make command to compile

Next, create two folders to put configuration files and shell files mkdir -p /usr/local/redis/etc mkdir -p /usr/local/redis/bin

cp redis.conf /usr/local/redis/etc/

cd src

cp mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server  /usr/local/redis/bin/

Start the redis service using /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf

Seeing the above picture means the startup is successful

Modify the daemonize parameter of the redis.conf configuration file to yes, and change redis to background startup (daemon thread)

Restart the redis service, there is no display indicating that the modification is successful

Use netstat -tunpl | grep redis or ps -ef | grep 6379 to see that port 6379 is occupied

Use /usr/local/redis/bin/redis-cli to enter client mode

use /usr/local/redis/bin/redis-cli shutdown or

pkill redis-server quits the redis service

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324624259&siteId=291194637