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 ...
随机推荐
- UVA - 10375 Choose and divide[唯一分解定理]
UVA - 10375 Choose and divide Choose and divide Time Limit: 1000MS Memory Limit: 65536K Total Subm ...
- 第8章 Java类的三大特性之一:封装
1.什么是封装 1.1概念 将类的某些信息隐藏在类内部,不允许外部程序直接访问,而是通过该类提供的方法来实现对隐藏信息的操作和访问.主要是类的属性 1.2好处 a.只能通过规定的方法访问数据b.隐藏类 ...
- 不封装ajax 带url参数调用接口
html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- SQLMAP参数介绍
转自:http://zhan.renren.com/bugpower?gid=3602888498044629629&checked=true SQLMAP参数介绍 sqlmap的使用方式:p ...
- C#调用LUA函数
using UnityEngine; using System.Collections; using LuaInterface; public class testLUACALL : MonoBeha ...
- linux 安全狗
下载 ;安装; service safedog start 或者 sdstart;sdui
- Android View 事件分发机制 源码解析 (上)
一直想写事件分发机制的文章,不管咋样,也得自己研究下事件分发的源码,写出心得~ 首先我们先写个简单的例子来测试View的事件转发的流程~ 1.案例 为了更好的研究View的事件转发,我们自定以一个My ...
- MVP之V和P的交互
三者之间的关系 在MVP初探里简单的描述了V和P之间是如何交互的. 无论是PV还是SC,M\V\P这三者之间的关系并没有发生改变,V只是前端的客户代理承现展显数据,P是如何处理客户交互行为的决策者. ...
- windows xp 连接USB网络打印机服务器(通用所有usb网络打印机服务器的安装)
usb网络打印机服务器是HP1101U 打印机是 hp1108 需要准备的其他东西:1.HP1108的驱动 首先,接好线,保证usb hp1101u能正常访问,这款USB一旦接入了网络,会分配一个ip ...
- 这些年学过的FPGA
这些年学过的FPGA 最近看了老罗的鄙视链是怎样炼成的,联想到FPGA.从2011年底开始接触FPGA到现在已经快接近4个年头了,这四年见证了Altera-FPGA的发展,使用的cyclone系列的芯 ...