安装redis
wget http://download.redis.io/releases/redis-5.0.8.tar.gz
安装gcc
yum -y install gcc
解压刚刚下载的
进入文件夹然后编译
编译redis
make MALLOC=libc
安装redis("PREFIX"后面是安装路径)
make PREFIX=/usr/local/redis/5.0.8 install
移动配置(把配置文件移动到安装路径)
cp redis.conf /usr/local/redis/5.0.8
redis基础运行命令
启动
./bin/redis-server redis.conf
后端启动
./bin/redis-server ./redis.conf
默认本机
./bin/redis-cli
连接其他主机
./bin/redis-cli -h ip 地址 -p 端口
初始配置
保护模式
protected-mode no
修改为后端服务
daemonize yes
修改ip
bind ip地址
修改端口
port 端口号