1.首先安装c的编译环境
yum -y install cpp
yum -y install binutils
yum -y install glibc
yum -y install glibc-kernheaders
yum -y install glibc-common
yum -y install glibc-devel
yum -y install gcc
yum -y install make
如果上面的软件都安装之后再执行make命令还报错,就需要在make命令后面加个选项了
make MALLOC=libc
2. redis安装部署(单机)
解压:tar -zxvf redis-2.8.19.tar.gz
make install
拷贝配置文件
cp redis/redis.conf /etc/
修改配置文件redis.conf
daemonize yes(后台运行)
logfile /usr/local/redis/log(日志文件)
启动
redis-server /etc/redis.conf [--port 6379]
redis客户端
redis-cli [-h 127.0.0.1] [-p 6379]
关闭
redis-cli shutdown
3. redis 集群搭建