yum install gcc gcc-c++ make zlib-devel readline readline-devel tkutil tk tkutil-devel tk-devel openssl openssl-devel wget vim ntp -y
下载redis
wget http://download.redis.io/releases/redis-3.2.9.tar.gz
解压redis
tar -zxvf redis-3.2.9.tar.gz
重命名redis
mv redis-3.2.9 /usr/local/redis
编译安装redis
cd /usr/local/redis
make & make install
创建端口
cd /usr/local/redis/utils
sh ./install_server.sh
6379
一直Enter
修改连接IP
vi /etc/redis
62 bind IP
redis 目录结构
/usr/local/redis
/etc/redis
/var/lib/redis
redis 开机自启动(3.2.9默认默认有启动脚本/etc/init.d)
chkconfig --add redis_6379
chkconfig redis_6379 on
端口状态查看
ps -ef|grep 6379
netstat -lntp | grep 6379
测试
redis-cli -h ip -p 6379