最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Redis 5.05 單獨模式安裝及配置方法

 更新時間:2019年10月24日 11:48:04   作者:余-雷  
這篇文章主要介紹了Redis 5.05 單獨模式安裝,文中通過代碼給大家介紹了Redis 5.0.5 單節(jié)點 安裝配置方法,需要的朋友可以參考下

操作系統(tǒng)Centos7 

1、下載redis 

wget http://download.redis.io/releases/redis-5.0.5.tar.gz
tar xzf redis-5.0.5.tar.gz
cd redis-5.0.5
make

2、啟動服務(wù) 

命令執(zhí)行完成之后,既可以啟動Redis 服務(wù)

[root@zk02 redis]# src/redis-server 
5265:C 23 Oct 2019 16:58:04.682 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5265:C 23 Oct 2019 16:58:04.682 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=5265, just started
5265:C 23 Oct 2019 16:58:04.682 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
5265:M 23 Oct 2019 16:58:04.683 * Increased maximum number of open files to 10032 (it was originally set to 1024).
  _._       
  _.-``__ ''-._      
 _.-`` `. `_. ''-._  Redis 5.0.5 (00000000/0) 64 bit
 .-`` .-```. ```\/ _.,_ ''-._     
 ( ' , .-` | `, ) Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
 | `-._ `._ / _.-' | PID: 5265
 `-._ `-._ `-./ _.-' _.-'     
 |`-._`-._ `-.__.-' _.-'_.-'|     
 | `-._`-._ _.-'_.-' |  http://redis.io 
 `-._ `-._`-.__.-'_.-' _.-'     
 |`-._`-._ `-.__.-' _.-'_.-'|     
 | `-._`-._ _.-'_.-' |     
 `-._ `-._`-.__.-'_.-' _.-'     
 `-._ `-.__.-' _.-'     
  `-._ _.-'      
  `-.__.-'      
 
5265:M 23 Oct 2019 16:58:04.684 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
5265:M 23 Oct 2019 16:58:04.684 # Server initialized
5265:M 23 Oct 2019 16:58:04.684 # 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.
5265:M 23 Oct 2019 16:58:04.684 # 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.
5265:M 23 Oct 2019 16:58:04.684 * Ready to accept connections

3、通過內(nèi)置的客戶端與redis 交互

[root@zk02 redis]# src/redis-cli 
127.0.0.1:6379> set foo bar 
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379>

日志的打開文件數(shù),可通過如下命令設(shè)置

ulimit -n 10032

ps:下面看下Redis 5.0.5 單節(jié)點 安裝配置

下載

http://download.redis.io/releases/redis-5.0.5.tar.gz

解壓

tar -C /usr/local -xvf redis-5.0.5.tar.gz

編譯安裝

cd /usr/local/redis-5.0.5
make install 

使用make install 安裝,默認(rèn)安裝目錄是/usr/local/bin/

Redis配置文件

將示例配置文件拷貝到/etc/redis/639.conf

mkdir /etc/redis
cp /usr/local/redis-5.0.5/redis.conf /etc/redis/6379.conf

關(guān)閉保護模式

protected-mode no

開放其他主機訪問,注釋掉bind 127.0.0.1

bind 127.0.0.1

更改為后臺啟動

daemonize yes

日志記錄,需要先創(chuàng)建目錄/var/applogs/redis

logfile "/var/applogs/redis/redis.log"

數(shù)據(jù)存儲目錄

mkdir -p /var/redis-data/
dir /var/redis-data

設(shè)置密碼

requirepass xxxx

Redis配置開機啟動服務(wù)

使用Redis自帶的啟動腳本

cp /root/share/deploy-ready/redis-5.0.5/utils/redis_init_script /etc/init.d/redisd

配置開啟自啟動

chkconfig redisd on

設(shè)置開機自啟動

chkconfig redisd on

防火墻開發(fā)6379端口

firewall-cmd --permanent --add-port=6379/tcp
firewall-cmd --reload

客戶端連接Redis

redis-cli -h 192.168.43.197 -p 6379 -a xxxx

相關(guān)文章

  • Redis動態(tài)熱點數(shù)據(jù)緩存策略設(shè)計

    Redis動態(tài)熱點數(shù)據(jù)緩存策略設(shè)計

    本文主要介紹了Redis動態(tài)熱點數(shù)據(jù)緩存策略設(shè)計,包括熱點數(shù)據(jù)識別、動態(tài)緩存、多級緩存、預(yù)加載機制、更新策略以及監(jiān)控告警等,具有一定的參考價值,感興趣的可以了解一下
    2025-01-01
  • redis中RDB(Redis Data Base)的機制

    redis中RDB(Redis Data Base)的機制

    本文主要介紹了redis中RDB(Redis Data Base)的機制,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-04-04
  • 基于Redis實現(xiàn)分布式鎖的方法(lua腳本版)

    基于Redis實現(xiàn)分布式鎖的方法(lua腳本版)

    這篇文章主要介紹了基于Redis實現(xiàn)分布式鎖的方法(lua腳本版),本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-05-05
  • redis?zrange?與?zrangebyscore的區(qū)別解析

    redis?zrange?與?zrangebyscore的區(qū)別解析

    這篇文章主要介紹了redis?zrange與zrangebyscore的區(qū)別,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2023-06-06
  • CentOS 6.5 64位下安裝Redis3.0.2的具體步驟

    CentOS 6.5 64位下安裝Redis3.0.2的具體步驟

    這篇文章主要介紹了CentOS 6.5 64位下安裝Redis3.0.2的具體步驟,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下
    2018-08-08
  • 一文搞懂Redis中的慢查詢?nèi)罩竞捅O(jiān)視器

    一文搞懂Redis中的慢查詢?nèi)罩竞捅O(jiān)視器

    我們都知道MySQL有慢查詢?nèi)罩?但Redis也有慢查詢?nèi)罩?可用于監(jiān)視和優(yōu)化查詢,本文給大家詳細(xì)介紹了Redis中的慢查詢?nèi)罩竞捅O(jiān)視器,文章通過代碼示例講解的非常詳細(xì),需要的朋友可以參考下
    2024-04-04
  • Redis實戰(zhàn)之商城購物車功能的實現(xiàn)代碼

    Redis實戰(zhàn)之商城購物車功能的實現(xiàn)代碼

    這篇文章主要介紹了Redis實戰(zhàn)之商城購物車功能的實現(xiàn)代碼,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-02-02
  • 在redhat6.4安裝redis集群【教程】

    在redhat6.4安裝redis集群【教程】

    這篇文章主要介紹了在redhat6.4安裝redis集群【教程】,需要的朋友可以參考下
    2016-05-05
  • redis主從切換導(dǎo)致的數(shù)據(jù)丟失與陷入只讀狀態(tài)故障解決方案

    redis主從切換導(dǎo)致的數(shù)據(jù)丟失與陷入只讀狀態(tài)故障解決方案

    這篇文章主要介紹了redis主從切換導(dǎo)致的數(shù)據(jù)丟失與陷入只讀狀態(tài)故障解決方案的相關(guān)資料,需要的朋友可以參考下
    2023-05-05
  • redis中key使用冒號分隔的原理小結(jié)

    redis中key使用冒號分隔的原理小結(jié)

    Redis是一種高性能的鍵值對非關(guān)系型數(shù)據(jù)庫,通過redis不同類型命令可以為其中的鍵指定不同的數(shù)據(jù)類型,其中每個鍵的命名規(guī)范通常使用冒號符號分隔字符串,本文主要介紹了redis中key使用冒號分隔的原理小結(jié),感興趣的可以了解一下
    2024-01-01

最新評論

十堰市| 赞皇县| 桂阳县| 德昌县| 海城市| 禹州市| 正蓝旗| 江孜县| 罗平县| 禹州市| 天水市| 专栏| 龙门县| 广州市| 来宾市| 海林市| 隆子县| 平遥县| 陆川县| 农安县| 凤阳县| 交口县| 桃园市| 黄梅县| 海南省| 云阳县| 翁源县| 雷山县| 施秉县| 仪陇县| 四川省| 梓潼县| 凤冈县| 台安县| 高陵县| 旺苍县| 名山县| 科尔| 嘉禾县| 上高县| 苏尼特左旗|