Redis 安装教程
1、下载:wget http://download.redis.io/releases/redis-5.0.5.tar.gz
2、解压缩:tar -zxvf redis-5.0.4.tar.gz
3、进入目录: cd redis-5.0.4
4、安装gcc:yum -y install gcc automake autoconf libtool make
如有报PID错误:rm -f /var/run/yum.pid
5、编译:make
6、安装:sudo make PREFIX=/usr/local/redis install
7、启动服务:./bin/redis-server ./redis.conf
启动客户端:./bin/redis-cli -a redis
关闭客户端:./bin/redis-cli shutdown
8、配置redis.conf:
将配置文件复制到redis目录:cp redis.conf /usr/local/redis
设置密码:requirepass redis
设置远程登录:#bind 127.0.0.1
守护进程开启:daemonize yes