ubuntu redis安装
vim /etc/redis/redis.cnf
//内容
requirepass 123456 //密码
redis-server /etc/redis/redis.conf //启动
service redis restart
service redis stop
redis-server /etc/redis.conf
redis-cli shutdown //关闭服务
redis-cli //客户端启动
redis-cli -h 127.0.0.1 -p 6379 -a myRedis //客户端启动,有密码
vim /etc/redis/redis.cnf
//内容
requirepass 123456 //密码
redis-server /etc/redis/redis.conf //启动
service redis restart
service redis stop
redis-server /etc/redis.conf
redis-cli shutdown //关闭服务
redis-cli //客户端启动
redis-cli -h 127.0.0.1 -p 6379 -a myRedis //客户端启动,有密码