常见问题
gcc 版本问题
centos7 默认安装版本 4.8.5,redis 6.0只支持 5.3以上
You need tcl 8.5 or newer in order to run the Redis test”
`wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar xzvf tcl8.6.1-src.tar.gz
cd ./tcl8.6.1/unix/
./configure
make
make install`
安装
1 | tar zxvf ./bak/redis-5.0.8 -C ./ |
cd src
./redis-server /home/mor/redis-5.0.8/redis.conf
查看 redis 进程
ps -aux | grep redis
配置 redis 服务并自动启动
1 | cd /etc/rc.d/init.d/ |
需要拷贝配置文件:cp /home/mor/redis-5.0.8/redis.conf /etc/redis.conf
配置文件说明
1 | # 指定redis只接收来自该IP的请求,如果不设置,将处理所有请求,在生产环节中最好设置该项 |
服务测试
1 | service redis start |