Redis数据库 安装
生活随笔
收集整理的這篇文章主要介紹了
Redis数据库 安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
介紹
Redis 是一個開源(BSD 許可)的內存數據結構存儲,用作數據庫、緩存和消息代理。Redis 提供數據結構,例如字符串、散列、列表、集合、具有范圍查詢的排序集合、位圖、超日志、地理空間索引和流。Redis 具有內置復制、Lua 腳本、LRU 驅逐、事務和不同級別的磁盤持久性,并通過 Redis Sentinel 和 Redis Cluster 自動分區提供高可用性。
Redis官網
1 Windows
2 Centos
2.1 安裝配置
確保這兩個命令都在“/usr/redis”目錄下執行即可
make make install2.2 使用Redis
連接本地redis
[root@client redis]$ src/redis-cli連接遠程redis
[root@master redis]$ src/redis-cli -h client向redis里寫入數據
[root@client redis]$ src/redis-cli -h 192.168.56.20 172.17.0.15:6379> set chengshi sh,bj,sz,nj,hf 172.17.0.15:6379> get chengshi2.3 常見報錯
2.3.1 make指令
cd src && make all make[1]: Entering directory `/usr/cstor/redis/src'CC adlist.o /bin/sh: cc: command not found make[1]: *** [adlist.o] Error 127 make[1]: Leaving directory `/usr/cstor/redis/src' make: *** [all] Error 2解決方法
yum -y install gcc gcc-c++ libstdc++-devel yum -y install gcc automake autoconf libtool make一系列安裝貨如果還報錯,就是上次安裝報錯殘留報錯問題
make distclean總結
以上是生活随笔為你收集整理的Redis数据库 安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微信小程序 倒计时实现
- 下一篇: MySQL 查询统计 日期查询