redis源码编译安装

2016-01-2322:25:11redis源码编译安装已关闭评论 780

软件版本:redis-2.8.24.tar.gz
系统环境:CentOS6.4

编译安装和测试
tar -zxvf redis-2.8.24.tar.gz
make
make test

创建redis程序目录
mkdir /usr/local/redis/{data/6369,bin,log}

拷贝文件
cp redis.conf /usr/local/redis/6369.conf
cd src
cp redis-server /usr/local/redis/bin
cp redis-cli /usr/local/redis/bin

编辑redis.conf
daemonize yes
pidfile /var/run/redis-6369.pid
logfile /usr/local/redis/log/6369.log
dir /usr/local/redis/data/6369

将redis-server redis-cli 复制到/usr/local/bin目录,可直接使用命令

启动时后面指定配置文件
redis-server /usr/local/redis/6369.conf

连接redis
redis-cli -p 6369