Install Redis in Linux
http://www.redis.cn/download.html
Download the Redis installation package from the official website
Install Redis
1. Import the installation package in Linux and decompress it
我们使用的是MovaXtrem远程链接软件
After the installation package is imported into Linux, continue to install
工作目录: /usr/local/src
压缩命令: tar -xvf redis-5.0.4.tar.gz
Unzip
Successfully decompressed
The installation package can be deleted after successful decompression
命令: rm -rf redis-5.0.4.tar.gz
successfully deleted
Change the name of the Redis root directory
原名字: redis-5.0.4
修改后: redis
命令: mv redis-5.0.4 redis
2. Install Redis
说明:在redis根目录中执行如下命令
命令: make
命令: make install
Command explanation: make is an instruction in the C language, which means to compile
make command execution
After successful execution
make install command execution
After successful execution
Modify Redis configuration file
The Redis configuration file is named ridis.conf in the Redis directory and
enters the configuration file to modify the configuration
命令:vim redis.conf
进去配置文件
1-Modify ip binding
Comment out the ip on line 69
2-Turn off protection mode
Change yes on line 88 to no
Turn on backend operation
Change no to yes on line 136
Redis server commands
1. 启动 redis: redis-server redis.conf
2. 进入客户端: redis-cli -p 6379 exit 退出|quit|ctrl+c
3. 关闭 redis: redis-cli -p 6379 shutdown