zoukankan      html  css  js  c++  java
  • fedorea19安装redis

    Redis 安装:

    $ wget http://redis.googlecode.com/files/redis-2.4.5.tar.gz

    $ tar xzf redis-2.4.5.tar.gz 

    $ cd redis-2.4.5 

    $ make & make install

    测试:

    $ src/redis-server

    $ src/redis-cli

     

    auth haojg //haojg是密码

     

    redis> set foo bar

    OK

    redis> get foo

    "bar"

    将redis.conf中的daemonize no 变成daemonize yes

    $ cd ../utils/

    $./install_server     //安装启动服务

     

    显示信息:

    root@hman utils]# ./install_server.sh 

    Welcome to the redis service installer

    This script will help you easily set up a running redis server

     

     

    Please select the redis port for this instance: [6379] 

    Selecting default: 6379

    Please select the redis config file name [/etc/redis/6379.conf] 

    Selected default - /etc/redis/6379.conf

    Please select the redis log file name [/var/log/redis_6379.log] 

    Selected default - /var/log/redis_6379.log

    Please select the data directory for this instance [/var/lib/redis/6379] 

    Selected default - /var/lib/redis/6379

    Please select the redis executable path [/usr/local/bin/redis-server] 

    s#^port [0-9]{4}$#port 6379#;s#^logfile .+$#logfile /var/log/redis_6379.log#;s#^dir .+$#dir /var/lib/redis/6379#;s#^pidfile .+$#pidfile /var/run/redis_6379.pid#;s#^daemonize no$#daemonize yes#;

    Copied /tmp/6379.conf => /etc/init.d/redis_6379

    Installing service...

    ./install_server.sh: line 178: update-rc.d: command not found

     exists, process is already running or crashed

    Installation successful!

     

    默认就可以了,一路回车

    执行完后,查看/etc/redis/6379.conf,这个文件默认不能用chkconfig来添加到启动项,会报错的,可以使用附件里的文件来替换或修改。

  • 相关阅读:
    一个简单的瀑布流效果
    C#遇到的一些奇怪问题
    能够按页号提取word文档文本内容的小程序,由C#实现
    设计模式学习之简单工场模式
    设计模式学习之策略模式
    检查机器是否安装了.NET Framework 或已经安装了哪些.net版本
    书籍清单
    使用Func<T>对对象进行排序
    定义一个委托的三种形式
    设计模式学习之设计原则
  • 原文地址:https://www.cnblogs.com/zhaofeng555/p/3630535.html
Copyright © 2011-2022 走看看