婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Redis 5.05 單獨模式安裝及配置方法

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

熱門標簽:臺灣電銷 四川穩定外呼系統軟件 南京手機外呼系統廠家 400電話辦理的口碑 b2b外呼系統 廊坊外呼系統在哪買 地圖標注工廠入駐 一個地圖標注多少錢 高碑店市地圖標注app

操作系統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、啟動服務 

命令執行完成之后,既可以啟動Redis 服務

[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、通過內置的客戶端與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>

日志的打開文件數,可通過如下命令設置

ulimit -n 10032

ps:下面看下Redis 5.0.5 單節點 安裝配置

下載

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 安裝,默認安裝目錄是/usr/local/bin/

Redis配置文件

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

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

關閉保護模式

protected-mode no

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

bind 127.0.0.1

更改為后臺啟動

daemonize yes

日志記錄,需要先創建目錄/var/applogs/redis

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

數據存儲目錄

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

設置密碼

requirepass xxxx

Redis配置開機啟動服務

使用Redis自帶的啟動腳本

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

配置開啟自啟動

chkconfig redisd on

設置開機自啟動

chkconfig redisd on

防火墻開發6379端口

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

客戶端連接Redis

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

您可能感興趣的文章:
  • Ubuntu18.04系統安裝、配置Redis及phpredis擴展操作詳解
  • SpringBoot Redis配置Fastjson進行序列化和反序列化實現
  • Docker下redis的主從配置教程詳解
  • Windows 和 Linux 上Redis的安裝守護進程配置方法
  • CentOS7安裝配置 Redis的方法步驟
  • spring boot中各個版本的redis配置問題詳析
  • 在SpringBoot中添加Redis及配置方法
  • Win10配置redis服務實現過程詳解

標簽:拉薩 定州 泰州 伊春 南寧 畢節 甘南 河源

巨人網絡通訊聲明:本文標題《Redis 5.05 單獨模式安裝及配置方法》,本文關鍵詞  Redis,5.05,單獨,模式,安裝,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Redis 5.05 單獨模式安裝及配置方法》相關的同類信息!
  • 本頁收集關于Redis 5.05 單獨模式安裝及配置方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 扬州市| 浦北县| 常山县| 兰州市| 武乡县| 新津县| 济南市| 渑池县| 北辰区| 青河县| 米易县| 东台市| 璧山县| 临沭县| 游戏| 寻乌县| 锡林浩特市| 舞阳县| 格尔木市| 富宁县| 黎川县| 苗栗市| 长岛县| 康定县| 鹤庆县| 丹阳市| 商都县| 秀山| 石阡县| 遂昌县| 清徐县| 黎城县| 小金县| 云和县| 双牌县| 蒲江县| 邵阳市| 航空| 永年县| 库伦旗| 长白|