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

  • 相关阅读:
    angular面试记忆的内容
    doctype
    161214、oracle查询表信息
    161213、Maven资源替换和Freemarker模板
    161212、并发编程中的关于队列
    161209、简要分析ZooKeeper基本原理及安装部署
    161208、Java enum 枚举还可以这么用
    161207、高并发:java.util.concurrent.Semaphore实现字符串池及其常用方法介绍
    161206、 Ionic、Angularjs、Cordova搭建Android开发环境
    161205、win10安装mysql5.7.16数据库
  • 原文地址:https://www.cnblogs.com/zhaofeng555/p/3630535.html
Copyright © 2011-2022 走看看