[root@test-01 ~]# yum -y install gcc-c++ tclx [root@test-01 ~]# cd /data/[root@test-01 data]# wget http://download.redis.io/redis-stable.tar.gz[root@test-01 data]# tar -zxf redis-stable.tar.gz[root@test-01 data]# cd redis-stable[root@test-01 redis-stable]# make MALLOC=libc[root@test-01 redis-stable]# make test[root@test-01 redis-stable]# make install[root@test-01 redis-stable]# mkdir /etc/redis[root@test-01 redis-stable]# cp redis.conf /etc/redis/6379.conf
修改配置文件以下参数:
[root@test-01 redis-stable]# vim /etc/redis/6379.conf参数 值 说明daemonize yes 使Redis以守护进程模式运行pidfile /var/run/redis_端口号.pid 设置Redis的PID文件位置port 端口号 设置Redis监听的端口号dir /var/redis/端口号 设置持久化文件存放位置
创建持久化文件存放目录
[root@test-01 redis-stable]# mkdir -p /var/redis/6379
启动redis
[root@test-01 redis-stable]# redis-server /etc/redis/6379.conf