vim /root/shells/redis.sh
case $1 in
"server"){
/opt/module/redis/src/redis-server /opt/module/redis/myredis/redis.conf
};;
"start"){
/opt/module/redis/src/redis-cli -h localhost
};;
esac
[root@hadoop106 shells]# ./redis.sh start
localhost:6379> key *
(error) ERR unknown command 'key'
localhost:6379> key
(error) ERR unknown command 'key'
localhost:6379> set name zzs
OK
localhost:6379> keys *
1) "name"
localhost:6379>quit