redis

首页redis
25
Apr
0

centos7.2安装redis

下载

wget http://download.redis.io/releases/redis-4.0.9.tar.gz

解压

tar -xzvf redis-4.0.9.tar.gz 

编译

make MALLOC=libc

安装

make install 

初始化配置

./utils/install_server.sh

查看运行状态

ps -ef|grep redis

systemctl status redis_6379.service

服务启动重启等

systemctl restart redis_6379

/usr/local/bin/redis-server /etc/redis/6379.conf

 redis_init_script 

修改密码

vim /etc/redis/6379.conf
requirepass password 打开注释requirepass 

进行命令行

redis-cli

config set requirepass passwrd  修改密码 不用重启

命令行验证密码

auth passwd

开机启动

systemctl enable redis_6379

开启远程访问

vim /etc/redis/6379.conf

#bind 127.0.0.1
protected-mode yes   -> protected-mode no

管理工具

https://redisdesktop.com/download