Linux安装redis
tar -xvf redis-3.2.8.tar.gz cd redis-3.2.8 make cd src make install mkdir -p /usr/local/redis/conf mkdir -p /usr/local/redis/bin mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server redis-trib.rb /usr/loca/redis/bin cp redis.conf /usr/local/redis/conf 后台启动redis服务 a)首先编辑conf文件,将daemonize属性改为yes(表明需要在后台运行) b)再次启动redis服务,并指定启动服务配置文件 redis-server /usr/local/redis/etc/redis.conf vi /etc/profile export PATH="$PATH:/usr/local/redis/bin" vim /etc/sysctl.conf vm.overcommit_memory = 1 net.core.somaxconn= 1024 设置密码 vim /usr/local/redis/conf/redis.conf requirepass 123456 登录redis 1.redis-cli -h IP -p PORT -a password 2.redis-cli -h IP -p PORT 111.206.18.73:6379>auth password