Centos安装Redis
在home目录下面创建software目录
mkdir software
上传redis的包到/home/software
**解压 **
tar -zxvf *****.gz
安装gcc
yum install -y gcc-c++tcl
安装tcl
yum install -y tcl
编译
make
清理编译失败文件
make disclean
安装
make install PREFIX=/usr/local/redis4
拷贝配置文件
cp redis.conf /usr/local/redis4/bin/
cd /usr/local/redis4/bin/
编辑redis.conf配置文件中的内容
vi redis.conf
bind 127.0.0.1
修改为
‘# bind 127.0.0.1’
protected-mode yes
修改为
protected-mode no
daemonize no
修改为
daemonize yes
启动
./redis-server reids.conf
关闭
./redis-cli shutdown