1.下载tar包
wget http://download.redis.io/releases/redis-5.0.5.tar.gz
解压 tar -xvf redis-5.0.5.tar.gz
cd redis-5.0.5/
2.编译源文件
编译测试 make test
最小安装服务器可能会报错:
-bash: make: command not found
安装对应服务
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
报出信息:You need tcl 8.5 or newer in order to run the Redis test
安装tcl
wget https://sourceforge.net/projects/tcl/files/Tcl/8.6.9/tcl8.6.9-src.tar.gz
tar -zxvf tcl8.6.9-src.tar.gz
cd tcl8.6.9/unix
./configure
make
make install
返回redis-5.0.5目录
重新执行 make test
编译 make
安装 make PREFIX=/usr/local/redis install (安装到指定目录)
3.配置启动
cp redis.conf /usr/local/redis
cd /usr/local/redis/
mkdir log
编辑redis.conf
vim redis.conf
1.后台启动,daemonize yes
2.绑定IP,bind 192.168.XX.XXX
3.数据存放路径,dir /usr/local/redis/log rdb存放的路径
4.指定持久化方式,appendonly yes
启动: ./bin/redis-server ./redis.conf
66790:C 11 Oct 2019 12:06:06.029 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
66790:C 11 Oct 2019 12:06:06.029 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=66790, just started
66790:C 11 Oct 2019 12:06:06.029 # Configuration loaded
查看是否启动成功:
ps aux | grep redis
- •VMware Workstation Pro 16安装CentOS7超详细图文步骤
- •CentOS7下配置使用JumpServer 堡垒机 (图文教程)
- •CentOS安装jdk的几种方法及配置环境变量方式
- •CentOS忘记密码修改方案以及centos卡在开机登录界面,命令失效的解决方法
- •解决笔记本安装centos7后无法调节屏幕亮度
- •VMware安装CentOS 8.1(CentOS 8系列可参考)的图文详细教程
- •CentOS7 minimal 最小化安装网络设置过程
- •CentOS7下搭建JumpServer
- •CentOS安装rpm包出现冲突时的解决办法
- •Vmware下CentOS7最小化安装方式