蝙蝠岛资源网 Design By www.hbtsch.com

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

标签:
redis,5.05,单独模式安装,redis,模式

蝙蝠岛资源网 Design By www.hbtsch.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
蝙蝠岛资源网 Design By www.hbtsch.com

评论“Redis 5.05 单独模式安装及配置方法”

暂无Redis 5.05 单独模式安装及配置方法的评论...

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。