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来添加到启动项,会报错的,可以使用附件里的文件来替换或修改。

  • 相关阅读:
    [BetterExplained]书写是为了更好的思考
    java 连接 mysql 数据库 ..password [yes]问题
    学习密度与专注力
    抠鼻屎的方法
    张飞流水账(摘)
    用 C 语言 连接 mysql (问题已解决)
    编程的首要原则(s)是什么?
    Tomat源码学习(二)(转载)
    [BetterExplained]为什么你应该(从现在开始就)写博客
    事件 代理 练习
  • 原文地址:https://www.cnblogs.com/zhaofeng555/p/3630535.html
Copyright © 2011-2022 走看看