redis部署
下载软件
[root@localhost /]# wget http://download.redis.io/releases/redis-2.8.9.tar.gz
解压、编译、安装
[root@localhost /]# ll redis-2.8..tar.gz
-rw-r--r--. root root Apr redis-2.8..tar.gz
[root@localhost /]# tar xf redis-2.8..tar.gz
[root@localhost /]# cd redis-2.8.
[root@localhost redis-2.8.]# less README
[root@localhost redis-2.8.]# make MALLOC=jemalloc
[root@localhost redis-2.8.]# make PREFIX=/usr/local/redis install
在/usr/local/redis/bin/目录下生成5个可执行文件,分别是:
redis-benchmark redis-check-dump redis-server redis-check-aof redis-cli
他们的作用:
redis-server:Redis服务器的daemon启动程序 redis-cli:redis命令行操作工具。当然,你也可以用telnet根据其纯文本协议来操作。 redis-benchmark:redis性能测试工具,测试redis在你的系统及你的配置下的读写性能 redis-check-aof:更新日志检查 redis-check-dump:用于本地数据库检查
配置环境变量
[root@localhost bin]# echo 'PATH=/usr/local/redis/bin/:$PATH' >> /etc/profile
[root@localhost bin]# tail - /etc/profile
PATH=/usr/local/redis/bin/:$PATH
[root@localhost bin]# . /etc/profile
[root@localhost bin]# which redis-server
/usr/local/redis/bin/redis-server
查看帮助
[root@localhost bin]# redis-server --help
Usage: ./redis-server [/path/to/redis.conf] [options]
./redis-server - (read config from stdin)
./redis-server -v or --version
./redis-server -h or --help
./redis-server --test-memory <megabytes> Examples:
./redis-server (run the server with default conf)
./redis-server /etc/redis/.conf
./redis-server --port
./redis-server --port --slaveof 127.0.0.1
./redis-server /etc/myredis.conf --loglevel verbose Sentinel mode:
./redis-server /etc/sentinel.conf --sentinel
启动redis服务
[root@localhost bin]# cd /redis-2.8.
[root@localhost redis-2.8.]# pwd
/redis-2.8.
[root@localhost redis-2.8.]# mkdir /usr/local/redis/conf
[root@localhost redis-2.8.]# cp redis.conf /usr/local/redis/conf/
[root@localhost redis-2.8.]# redis-server /usr/local/redis/conf/redis.conf & [] Sep ::36.625 # Server started, Redis version 2.8.
[] Sep ::36.625 # WARNING overcommit_memory is set to ! 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.
[] Sep ::36.625 * DB loaded from disk: 0.000 seconds
[] Sep ::36.625 * The server is now ready to accept connections on port [root@localhost redis-2.8.]# killall redis-server
[ | signal handler] () Received SIGTERM, scheduling shutdown...
[root@localhost redis-2.8.]# [] Sep ::37.032 # User requested shutdown...
[] Sep ::37.032 * Saving the final RDB snapshot before exiting.
[] Sep ::37.033 * DB saved on disk
[] Sep ::37.034 # Redis is now ready to exit, bye bye... []+ Done redis-server /usr/local/redis/conf/redis.conf
[root@localhost redis-2.8.]# sysctl vm.overcommit_memory=
vm.overcommit_memory = [] Sep ::13.916 # Server started, Redis version 2.8.
[] Sep ::13.917 * DB loaded from disk: 0.000 seconds
[] Sep ::13.917 * The server is now ready to accept connections on port
[root@localhost redis-2.8.]# lsof -i :
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
redis-ser root 4u IPv6 0t0 TCP *: (LISTEN)
redis-ser root 5u IPv4 0t0 TCP *: (LISTEN)
关闭redis服务
[root@localhost redis-2.8.]# redis-cli shutdown
[] Sep ::56.467 # User requested shutdown...
[] Sep ::56.467 * Saving the final RDB snapshot before exiting.
[] Sep ::56.549 * DB saved on disk
[] Sep ::56.549 # Redis is now ready to exit, bye bye...
[]+ Done redis-server /usr/local/redis/conf/redis.conf
[root@localhost redis-2.8.]# lsof -i :
redis部署的更多相关文章
- Nginx+redis部署tomcat集群
一.部署环境: 两个tomcat实例部署在Ubuntu 14上,IP地址分别为192.168.1.110和192.168.1.111,Nginx和redis部署在windows7上,IP地址为192. ...
- redis部署问题
在部署redis哨兵的时候,一开始一直都是失败:杀死master进程后,没有选出新的master 日志如下 9985:X 18 Feb 20:14:42.409 # +sdown master mym ...
- Redis 部署方式(单点、master/slaver、sentinel、cluster) 概念与区别
转载自 https://blog.csdn.net/java_zyq/article/details/83818341 在K8S上部署Redis集群时突然遇到一个(sentinel哨兵模式)概念,感觉 ...
- Operator 示例:使用 Redis 部署 PHP 留言板应用程序
「Kubernetes 官方示例:使用 Redis 部署 PHP 留言板应用程序」Operator 化. 源码仓库:https://github.com/jxlwqq/guestbook-operat ...
- nginx + tomcat + redis 部署项目,解决session共享问题。
最近自己搭了一套nginx的环境,集群部署了公司的一个项目,中间解决了session共享的问题.记录如下,以备日后查看. 1.环境 windows10 家庭中文版,jdk 7, tomcat 7.0. ...
- Redis 部署主从哨兵 C#使用,实现自动获取redis缓存 实例1
源码示例下载链接: https://pan.baidu.com/s/1eTA63T4 密码: un96 实现目标:windows 下安装 一台master服务 一台salve redis服务器 并且哨 ...
- Redis部署说明
一.普通部署 将Redis-x64-3.2.100解压,修改配置文件,一般不需要修改,直接使用默认,具体要修改可自行百度. 打开命令行,定位到解压目录,执行命令: redis-server.exe r ...
- .net 数据缓存(二)之Redis部署
现在的业务系统越来复杂,大型门户网站内容越来越多,数据库的数据量也越来愈大,所以有了“大数据”这一概念的出现.但是我们都知道当数据库的数据量和访问过于频繁都会影响系统整体性能体验,特别是并发量高的系统 ...
- (Nginx+PHP+MySQL)单机+Redis部署
链接:Nginx+PHP+MySQL+Redis多机部署 1.lnmp+redis工作机制 2.lnmp+redis操作步骤(lnmp为单机部署) (1)lnmp+redis实战环境 lnmp服务器: ...
- nginx+uwsgi+python3+pipenv+mysql+redis部署django程序
1.下载项目 git clone https://github.com/wangyitao/MyBlogs.git 2.进入Myblogs目录 cd MyBlogs 3.创建虚拟环境并且安装依赖 pi ...
随机推荐
- Spring源码分析——BeanFactory体系之接口详细分析
Spring的BeanFactory的继承体系堪称经典.这是众所周知的!作为Java程序员,不能错过! 前面的博文分析了Spring的Resource资源类Resouce.今天开始分析Spring的I ...
- Type.IsContextful 说明
首先看MSDN的说明: 中文:获取一个值,通过该值指示 Type 在上下文中是否可以被承载. 英文:Gets a value indicating whether the Type can be ho ...
- Stack Overflow: The Architecture - 2016 Edition
To get an idea of what all of this stuff “does,” let me start off with an update on the average day ...
- Linq to Xml读取复杂xml(带命名空间)
前言:xml的操作方式有多种,但要论使用频繁程度,博主用得最多的还是Linq to xml的方式,觉得它使用起来很方便,就用那么几个方法就能完成简单xml的读写.之前做的一个项目有一个很变态的需求:C ...
- SharePoint Fundation 2013中SecurityTokenServiceApplication错误
在Fundation 2013与Office Web Apps Server集成,预览文档时提示错误,存入口检查失败,因为可用内存(47091712 字节)少于总内存的 5%.因此,该服务不可用于传入 ...
- 软件工程(FZU2015)赛季得分榜,第八回合
目录 第一回合 第二回合 第三回合 第四回合 第五回合 第6回合 第7回合 第8回合 第9回合 第10回合 第11回合 积分规则 积分制: 作业为10分制,练习为3分制:alpha30分: 团队项目分 ...
- cosbench 异常 FreeMarker template error: The following has evaluated to null or missing
问题现象: 使用Cosbench 0.4.2.c4 版本测试Ceph RGW read test失败,遇到异常如下: FreeMarker template error: The following ...
- SetEnvlfNoCase 记录从自己网站之外传来的请求
<FilesMatch \.(jpg|gif|png)$> SetEnvIfNoCase Referer "^http://www.example.com/" loca ...
- [webpack] devtool配置对比
文件结构 -src -views -essay -list.js -detail.js -index.js -webpack.config.js 文件内容 [/src/.../index.js] im ...
- poj 3680 Intervals
给定N个带权的开区间,第i个区间覆盖区间(ai,bi),权值为wi.现在要求挑出一些区间使得总权值最大,并且满足实轴上任意一个点被覆盖不超过K次. 1<=K<=N<=200.1< ...