CentOS 6.3 安装 Redis

1. tar -zvxf redis-3.0.0.tar.gz

2. cd redis-3.0.0

3. make PREFIX=/usr/local/redis install

4. mkdir -p /etc/redis

5.cp redis.conf /etc/redis

  cd src

  cp -pf redis-server /usr/local/bin

  cp -pf redis-benchmark /usr/local/bin

  cp -pf redis-cli /usr/local/bin

  cp -pf redis-check-dump /usr/local/bin

  cp -pf redis-check-aof /usr/local/bin

6.mkdir -p /data/logs/redis

7.vi /etc/redis/redis.conf

  daemonize yes  #redis 以后台进程运行

  pidfile  /var/run/redis.pid  #给后台进程绑定一个PID

  loglevel  notice           #日志级别

  logfile  /data/logs/redis/redis.log  #日志文件

  bind 192.168.0.0    #绑定的本机IP

8./usr/local/bin/redis-server /etc/redis/redis.conf

9./usr/local/bin/redis-cli -h 192.168.0.0

  set name admin

  OK

  get name

  "admin"




你可能感兴趣的:(centos)