在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

Redis 4.0源码安装的示例分析

145次阅读
没有评论

共计 3675 个字符,预计需要花费 10 分钟才能阅读完成。

这篇文章主要介绍了 Redis 4.0 源码安装的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让丸趣 TV 小编带着大家一起了解一下。

去官网下载软件
https://redis.io/download

最新稳定版本是 4.0
上传到服务器

解压软件
[root@MySQL01 ~]# cd /install/
[root@MySQL01 install]# tar xvfz redis-4.0.2.tar.gz

编译安装
[root@MySQL01 install]# cd redis-4.0.2
[root@MySQL01 redis-4.0.2]# make

    CC module.o
    CC evict.o
    CC expire.o
    CC geohash.o
    CC geohash_helper.o
    CC childinfo.o
    CC defrag.o
    CC siphash.o
    CC rax.o
    LINK redis-server
    INSTALL redis-sentinel
    CC redis-cli.o
    LINK redis-cli
    CC redis-benchmark.o
    LINK redis-benchmark
    INSTALL redis-check-rdb
    INSTALL redis-check-aof

Hint: It s a good idea to run make test )
make[1]: Leaving directory `/install/redis-4.0.2/src

启动 redis
[root@MySQL01 redis-4.0.2]# src/redis-server
[1] 48741
[root@MySQL01 redis-4.0.2]# 48741:C 03 Nov 19:29:48.941 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
48741:C 03 Nov 19:29:48.941 # Redis version=4.0.2, bits=64, commit=00000000, modified=0, pid=48741, just started
48741:C 03 Nov 19:29:48.941 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
48741:M 03 Nov 19:29:48.944 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._                                                  
           _.-“__ -._                                            
      _.-“    `.  `_.   -._           Redis 4.0.2 (00000000/0) 64 bit
  .-“ .-“`.  “`\/    _.,_ -._                                  
 (         ,       .-`  | `,    )     Running in standalone mode
 |`-._`-…-` __…-.“-._| ` _.- |     Port: 6379
 |    `-._   `._    /     _.-    |     PID: 48741
  `-._    `-._  `-./  _.-    _.-                                  
 |`-._`-._    `-.__.-    _.- _.- |                                  
 |    `-._`-._        _.- _.-    |           http://redis.io        
  `-._    `-._`-.__.- _.-    _.-                                  
 |`-._`-._    `-.__.-    _.- _.- |                                  
 |    `-._`-._        _.- _.-    |                                  
  `-._    `-._`-.__.- _.-    _.-                                  
      `-._    `-.__.-    _.-                                      
          `-._        _.-                                          
              `-.__.-                                              

48741:M 03 Nov 19:29:48.950 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
48741:M 03 Nov 19:29:48.950 # Server initialized
48741:M 03 Nov 19:29:48.950 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add vm.overcommit_memory = 1 to /etc/sysctl.conf and then reboot or run the command sysctl vm.overcommit_memory=1 for this to take effect.
48741:M 03 Nov 19:29:48.950 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command echo never /sys/kernel/mm/transparent_hugepage/enabled as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
48741:M 03 Nov 19:29:48.950 * DB loaded from disk: 0.000 seconds
48741:M 03 Nov 19:29:48.950 * Ready to accept connections

通过内置的客户端工具连接到 redis
[root@MySQL01 redis-4.0.2]# src/redis-cli
127.0.0.1:6379 set foo bar
OK
127.0.0.1:6379 get foo
bar

查看进程
[root@MySQL01 redis-4.0.2]# ps -ef|grep redis
root     48741     1  0 Nov03 ?        00:00:25 src/redis-server *:6379

为 Python 3.6.1 语言安装 Redis 客户端库
[root@MySQL01 redis-4.0.2]# pip3 install redis hiredis
Collecting redis
  Downloading redis-2.10.6-py2.py3-none-any.whl (64kB)
    100% |████████████████████████████████| 71kB 107kB/s 
Collecting hiredis
  Downloading hiredis-0.2.0.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 501kB/s 
Installing collected packages: redis, hiredis
  Running setup.py install for hiredis … done
Successfully installed hiredis-0.2.0 redis-2.10.6

通过 Python 3 登录 Redis
[root@MySQL01 redis-4.0.2]# python
Python 3.6.1 (default, Oct  2 2017, 06:28:48) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type help , copyright , credits or license for more information.
import redis
conn = redis.Redis()
conn.set(hello , world)
True
conn.get(hello)
b world

感谢你能够认真阅读完这篇文章,希望丸趣 TV 小编分享的“Redis 4.0 源码安装的示例分析”这篇文章对大家有帮助,同时也希望大家多多支持丸趣 TV,关注丸趣 TV 行业资讯频道,更多相关知识等着你来学习!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-24发表,共计3675字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 日本一区二区在线播放 | 欧美综合色网 | 青青青国产精品国产精品美女 | 成年美女黄网站色大片免费软件看 | 午夜欧美成人久久久久久 | 久久亚洲av午夜福利精品一区 | 国产小视频在线免费观看 | 99热久久国产精品这里小说 | 91免费网站在线看入口黄 | 精品爆乳一区二区三区无码av | 亚洲视频一区二区 | 日韩电影免费在线观看中文字幕 | 亚洲另类xxxx| 国产福利一区二区在线精品 | 九九精品国产99精品 | 免费不卡在线观看av | 香蕉人人超 | 国产欧美日韩不卡一区二区三区 | 综合久久久久 | 成年美女黄网站色大免费视频 | 日本三级韩国三级欧美三级 | 国产亚洲精品久久久久5区 国产亚洲精品久久久久的角色 | 婷婷播放器| 在线观看国产一区二区三区 | 免费观看一级黄色片 | 久久视频精品538在线久 | 精品无码国产自产拍在线观看 | 亚洲av无码久久久久网站蜜桃 | 亚洲最大av资源站无码av网址 | 四虎爱爱 | 久草高清在线 | 在线亚洲一区二区 | 草草在线观看 | 亚洲一区 中文字幕 久久 | 亚洲熟伦熟女新五十路熟妇 | 2019精品国产品免费观看软件 | 热99re久久精品2久久久 | 男人扒开女人腿桶到爽免费 | 精品一区久久 | 国产艳妇av在线观看果冻传媒 | 四虎影视免费永久在线观看 |