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

  • 相关阅读:
    取球游戏
    初来乍到
    大臣的旅费
    【转载】.NET Core微服务架构学习与实践系列文章索引目录
    【转载】直接拿来用,最火的.NET开源项目
    C# For Demo
    【转载】快速序列化组件MessagePack介绍
    【转载】C# 网上收集的一些所谓的开源项目
    【转载】为了拿捏 Redis 数据结构,我画了 40 张图(完整版)
    【转载】Identity Server 4 从入门到落地(七)—— 控制台客户端
  • 原文地址:https://www.cnblogs.com/zhaofeng555/p/3630535.html
Copyright © 2020-2023  润新知