zoukankan      html  css  js  c++  java
  • install redis

    1.Office Download redis.tar.gz  from website --- redis.io

    2.uncompact file

    $ tar zxvf redis-3.2.9.tar.gz && mv redis-3.2.9  /opt/redis

    3.compile redis:

    $ cd /opt/redis && make && make install

    4.configure redis

    $ sudo mkdir /etc/redis

    $ sudo cp redis.conf  /etc/redis/redis.conf

    5.launch redis,specialize configuration file

    $ /opt/redis/src/redis-server /etc/redis/redis.conf

    6.lauch redis passing arguments via the command line

    $ ./redis-server --port 6380 --slaveof 127.0.0.1 6379

    7. use redis-cli

    redis-Command Line Interface

    (1)

    $ ./redis-cli  # Pass authentication Using "auth" directives

    127.0.0.1:6379> auth foobared
    OK

    (2)

    $ ./redis-cli -n 1 -a foobared incr mycounter

    8. get value

    $ ./src/redis-cli -a foobared get k1

     9. enable authentication

    (1) uncomment the line including 'requirepass'

    $ sudo sed -r '/^#s?requirepass/ s/^#s?//g' -i /etc/redis/redis.conf

    $ cat /etc/redis/redis.conf | grep -P s?requirepass

  • 相关阅读:
    pycharm运行html文件报404错误
    css3 鼠标悬浮动画效果
    子代选择器和后代选择器的区别
    前端入门
    爬虫Scrapy框架
    BeautifulSoup
    爬虫之selenium使用
    爬虫之BeautifulSoup
    urllib模块
    爬虫基础
  • 原文地址:https://www.cnblogs.com/zhengwenqiang/p/6924807.html
Copyright © 2011-2022 走看看