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

Redis 5.05中单独模式安装及配置的示例分析

160次阅读
没有评论

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

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

操作系统 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 
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

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

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-04发表,共计3207字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 武则天肉体大战野史dvd | 天天曰天天干 | 欧美成人精品手机在线观看 | 亚洲激情成人 | 欧美日韩三级 | 67194在线午夜亚洲 | a影院| 精品人妻系列无码人妻免费视频 | 国产精品亚洲一区二区三区久久 | 日本一区视频在线观看 | 欧美最大成人毛片视频网站 | 一本无码人妻在中文字幕免费 | 中文字幕无码一区二区免费 | 三级在线观看网站 | 久久爱wwwww 久久爱www人成 | 精品无码一区二区三区爱欲 | 少妇被又大又粗又爽毛片 | 在线小视频你懂的 | 亚洲福利午夜 | 免费做爰猛烈吃奶摸视频在线观看 | 久久免费看少妇高潮v片特黄 | 社区天堂 | 日本久久网 | 国产偷窥熟女精品视频大全 | 日本韩国欧美在线观看 | 美女视频黄频大全免费 | 欧美精品成人 | 国内精品久久久久久久久 | 亚洲av成人精品日韩一区 | 99热久久这里只有精品2010 | 亚洲美女视频在线 | 中文字幕乱码无码人妻系列蜜桃 | 免费a级毛片无码a∨男男 | 男女一边桶一边摸一边脱视频免费 | 亚洲三级在线免费观看 | 亚洲av无码国产一区二区三区 | 久久亚洲不卡一区二区 | 美女的隐私免费视频蜜桃 | 国产色婷婷亚洲99精品小说 | 人妻少妇-嫩草影院 | 99久久无色码中文字幕 |