Redis之Redis
Redis 环境安装
安装
如果已经安装了老版本3.0.6
1. 卸载软件
sudo apt-get remove redis-server
2. 清除配置
sudo apt-get remove --purge redis-server
3. 删除残留文件
sudo find / -name redis
一般设置如下
sudo rm -rf var/lib/redis/
sudo rm -rf /var/log/redis
sudo rm -rf /etc/redis/
sudo rm -rf /usr/bin/redis-*
下载地址:http://redis.io/download ,下载最新文档版本,稳定版系列.
- 下载安装文件
wget http://download.redis.io/releases/redis-3.2.3.tar.gz
- 解压
tar -zxvf redis-3.2.3.tar.gz
- copy文件并ls查看
sudo mkdir -p /usr/local/redis/
sudo cp -r redis-3.2.3/* /usr/local/redis/
ls /usr/local/redis/
- 进入安装目录
cd /usr/local/redis/
编译
首先打开
README.md,翻阅基本build和install方式。sudo make
尝试环境是否可以正常使用(Hint: It's a good idea to run 'make test' ;)
sudo make test
如果出现
\o/ All tests passed without errors!

表示redis环境没有问题。
安装 最后安装路径
sudo make install
查看编译好的命令文件
ls /usr/local/bin/redis-*
--/usr/local/bin/redis-benchmark 性能测试工具,例如:redis-benchmark -n 1000000 -c 50 , 50个客户端,并发1000000个SETs/GETs查询
--/usr/local/bin/redis-check-aof 更新日志检查
--/usr/local/bin/redis-check-dump 本地数据文件检查
--/usr/local/bin/redis-cli 命令行操作工具
--/usr/local/bin/redis-server 服务器程序
- 修改配置文件
sudo mkdir /etc/redis
sudo cp redis.conf /etc/redis/
ls /etc/redis/redis.conf
启动redis
$redis-server /etc/redis/redis.conf
出现以下代表启动成功
python@ubuntu:~$ redis-sever /etc/redis/redis.conf
未找到 'redis-sever' 命令,您要输入的是否是:
命令 'redis-server' 来自于包 'redis-server' (universe)
redis-sever:未找到命令
python@ubuntu:~$ redis-server /etc/redis/redis.conf
23003:M 17 Sep 10:52:57.535 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.3 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 23003
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
23003:M 17 Sep 10:52:57.536 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
23003:M 17 Sep 10:52:57.537 # Server started, Redis version 3.2.3
23003:M 17 Sep 10:52:57.537 # 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.
23003:M 17 Sep 10:52:57.537 # 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.
23003:M 17 Sep 10:52:57.537 * The server is now ready to accept connections on port 6379
连接redis服务器
新开一个窗口,或者redis-server后台启动。
通过
$ redis-cli
得到
127.0.0.1:6379>
127.0.0.1:6379> ping
PONG
代表redis服务器已经正常安装并且可以使用了。
Redis之Redis的更多相关文章
- Java Spring mvc 操作 Redis 及 Redis 集群
本文原创,转载请注明:http://www.cnblogs.com/fengzheng/p/5941953.html 关于 Redis 集群搭建可以参考我的另一篇文章 Redis集群搭建与简单使用 R ...
- CentOS下安装Redis及Redis的PHP扩展
1.安装Redis 1.1 如果没有安装wget,安装wget yum install wget 1.2 在http://redis.io/download页面查看redis版本,并下载安装 wget ...
- redis/php redis扩展 安装
作者:silenceper 日期:2013-10-03 原文地址: http://silenceper.com/archives/952.html 我是在CentOS 6.3 中进行的. 使用到的软件 ...
- windows下与linux下安装redis及redis扩展
1. Redis的介绍 Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起 ...
- redis系列-redis的使用场景
redis越来越受大家欢迎,提升下速度,做下缓存,完成KPI之利器呀.翻译一篇文章<<How to take advantage of Redis just adding it to yo ...
- 搭建LNAMP环境(五)- PHP7源码安装Redis和Redis拓展
上一篇:搭建LNAMP环境(四)- 源码安装PHP7 一.安装Redis 1.创建redis用户组和用户 groupadd redis useradd -r -g redis -s /sbin/nol ...
- redis配置文件redis.conf参数说明
redis配置文件redis.conf参数说明 (2013-01-09 21:20:40)转载▼ 标签: redis配置 redis.conf 配置说明 杂谈 分类: nosql # By defau ...
- 【Redis】Redis的基本安装及使用
在Linux上安装Redis Redis的安装很简单.基本上是下载.解压.运行安装脚本.我用的Redis版本是3.2.1. [nicchagil@localhost app]$ wget -q htt ...
- vagrant系列教程(四):vagrant搭建redis与redis的监控程序redis-stat(转)
上一篇php7环境的搭建 真是火爆,仅仅两天时间,就破了我之前swagger系列的一片文章,看来,大家对搭建环境真是情有独钟. 为了访问量,我今天再来一篇Redis的搭建.当然不能仅仅是redis的搭 ...
- [redis] 分布式 Redis 的 CRUD 实现
1.applicationContext-redis.xml <?xml version="1.0" encoding="UTF-8"?> < ...
随机推荐
- [iOS微博项目 - 3.5] - 封装业务
github: https://github.com/hellovoidworld/HVWWeibo A.封装微博业务 1.需求 把微博相关业务(读取.写微博) 界面控制器不需要知道微博操作细节( ...
- 常见到的runtime exception
ClassCastException 类转换异常 IllegalArgumentException 非法参数异常 IndexOutOfBoundsException 数组越界异常 Nul ...
- zipline风险指标计算 (empyrical模块)
概述 量化中,我们经常会遇到各种量化指标的计算,对于zipline来说,也会对这部分计算进行处理,由于指标计算的通用性比较强,所以,zipline单独封装了 empyrical 这个模块,可以处理类似 ...
- nanomsg(ZeroMQ with C)
1.应用手册 https://github.com/nanomsg/nanomsg % mkdir build % cd build % cmake .. % cmake --build . % ct ...
- vim符号列表
Exuberant Ctags工具安装 • 软件简介 Ctags generates an index (or tag) file of language objects found in sourc ...
- python 之操作mysql 数据库实例
对于python操作mysql 数据库,具体的步骤应为: 1. 连接上mysql host 端口号 数据库 账号 密码2. 建立游标3. 执行sql(注意,如果是update,insert,delet ...
- testng生成报告 testng-xslt 美化测试报告
testng生成报告 testng-xslt 美化测试报告 testng生成报告 testng-xslt 美化测试报告 用TestNG测试后,自动会生成html的测试报告.利用 testNG-xslt ...
- SqlAlchemy 中操作数据库时session和scoped_session的区别(源码分析)
原生session: from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalch ...
- postgresql 建模文件 LDM 转成PDM 生成 SQL问题
LDM 转成 PDM (Tool --- GPDM ) 生成 SQL,查看全部SQL 详细步骤见下图. 1.postgresql 没有 VARCHAR2 只有 VARCHAR. 2.LDM 生成 PD ...
- rabbitmq报错type
TypeError: exchange_declare() got an unexpected keyword argument 'type' 原因应该为pika版本不同导致的用法不同,解决方法为把t ...