Redis

安装

  1. 创建运行redis的单独用户,用户名redis:useradd redis
  2. 切换到redis用户:su - redis
  3. 下载redis源码:wget http://download.redis.io/releases/redis-3.0.7.tar.gz
  4. tar xzf redis-3.0.7.tar.gz
  5. cd redis-3.0.7
  6. make
  7. 编辑redis.conf

    daemonize yes
    pidfile /tmp/redis.pid
    port 13344
    bind 127.0.0.1
    logfile "/home/redis/redis.log"
    dir /home/redis/data
    rename-command FLUSHALL ""
    rename-command CONFIG   ""
    rename-command EVAL     ""
    
  8. 配置开机自启动

    1. 切换到root用户
    2. cp /home/redis/redis-3.0.7/utils/redis_init_script /etc/init.d/redisd
    3. vim /etc/init.d/redisd, 修改如下项:

    4. chkconfig redisd on

    5. 启动/关闭:service redisd start/stop

results matching ""

    No results matching ""