redis入门,linux安装
1.下载 https://redis.io/download
2.上传到linux服务器tools文件夹下
3.解压到安装目录 tar -zxf /app/redis/redis-5.0.4.tar.gz
4.进入解压文件目录使用make对解压的Redis文件进行编译
cd /app/redis/redis-5
make
5.编译完成后进入src 用make install 进行安装
部署
1.为了方便管理,将Redis文件中的conf配置文件和常用命令移动到统一文件中
mv redis.conf /app/redis/etc/
进入src目录,移动mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server到/app/redis/bin/
执行命令 :mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server /app/redis/bin/
执行./redis-server 启动redis
6.设置后台启动redis
1)、首先编辑conf文件,将daemonize属性改为yes(表明需要在后台运行)
cd etc/
vim redis.conf
将no修改为yes
2)、再次启动redis服务,并指定启动服务配置文件
./redis-server /app/redis/etc/redis.conf
7.设置linux 通行端口redis(6379)并重启防火墙 service iptables resestart
8.查看进程netstat -tunpl|grep 6379
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
出现以上问题 redis.conf 中bind 127.0.0.1 未用#注释掉
1)机器之间网络无法联通
2)ip和端口号不正确
3)虚拟机中防火墙的原因(可能性较大)
4)redis.conf 中bind 127.0.0.1 未用#注释掉
Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
出现以上问题解决方案
1)[root@localhost bin]# cd /app/redis/redis-5.0.4/src/ 进入该目录
2)[root@localhost src]# ./redis-cli 执行该命令
127.0.0.1:6379> config set protected-mode "no" 将受保护模式改为no
redis入门,linux安装的更多相关文章
- redis在linux安装和开机启动和结合php运用方法一
第一部分:安装redis 希望将redis安装到此目录 1 /usr/local/redis 希望将安装包下载到此目录 1 /usr/local/src 那么安装过程指令如下: 1 2 3 4 5 6 ...
- Redis for linux安装配置之—-源码安装
一‘redis单实例安装配置1.下载redis源码压缩包,并将其上传至服务器/usr/local2.解压redis源码压缩包 # tar -xzvf redis-3.2.12.tar.gz3.进入r ...
- tomcat+java+redis环境linux安装
最近要加一个环境测试,自力更生,丰衣足食,记下来下次安装环境速度快点 java jdk-1.80_131 64位 这个jdk 对于初次下载的人要注意,oracel现在不登录不让下载,而注册用户时页面无 ...
- Redis入门--1.安装Redis
redis是什么? 是完全开源免费的,用c语言编写的,是一个单线程,高性能的(key/value)内存数据库,基于内存运行并支持持久化的nosql数据库 redis能干嘛? 主要是用来做缓存,但不仅仅 ...
- CentOs8安装redis与Linux安装GDI+图形
1.安装 yum install redis 2.编辑配置文件 vim /etc/redis.conf #requirepass那行并打开注释,在后面写自己的密码,如下 requirepass you ...
- Redis在Linux安装详细步骤
一.准备环境: 1.VMware 2.CentOS 3.redis-3.0.4.tar.gz 4.下载地址 Http://redis.io/ 英文版 Http://www.redis.cn/ 中 ...
- redis 在linux安装
转自:http://futeng.iteye.com/blog/2071867 下载 官网下载 安装 tar zxvf redis-2.8.9.tar.gz cd redis-2.8.9 #直接mak ...
- Redis:Linux安装与使用
Redis的存储结构:字符类型,散列类型,列表类型,集合类型,有序集合. Redis功能: 可以为每个key设置超时时间. 可以通过列表类型来实现分布式队列的操作. 支持发布订阅的消息模式. 为什么使 ...
- redis的linux安装
1.下载安装包 [root@localhost opt]# yum install wget [root@localhost opt]# wget http://download.redis.io/r ...
- redis入门指南-安装redis
纸上得来终觉浅 绝知此事要躬行 Redis官方不支持window.微软发布了可在redis的分支.不建议使用 但我确实用了. win7 redis2.8.4 php5.6 apache2.4 ht ...
随机推荐
- Azure DevOps (九) 通过流水线推送镜像到Registry
上一篇文章我们研究了如何通过流水线编译出一个docker的镜像,本篇我们来研究一下,如何把编译好的镜像推送到镜像仓库去. 平时如果我们是单机部署,我们的docker本身就装在部署的机器上,我们在本机直 ...
- 数据库纳管平台DBhouse的技术路线与实践
为帮助开发者更好地了解和学习前沿数据库技术,腾讯云数据库特推出"DB · TALK"系列技术分享会,聚焦干货赋能创新,邀请数十位鹅厂资深数据库专家每月和您一起深入探讨云数据库的内核 ...
- docker基础_docker镜像与分层
docker镜像与分层 docker镜像由一些松耦合的制度镜像层组成 docker负责堆叠这些镜像层并将它们表示为单个统一的对象 当 docker image pull ubuntu:latest 时 ...
- HTTP:聊一聊HTTP中的强制缓存
http响应response headers中会有一个cache-control,这个参数就是用来做强制缓存的 一.什么是强制缓存 强制缓存就是服务端告诉客户端某些资源(JS CSS IMG)需要按照 ...
- netty系列之:netty中的核心解码器json
目录 简介 java中对json的支持 netty对json的解码 总结 简介 程序和程序之间的数据传输方式有很多,可以通过二进制协议来传输,比较流行的像是thrift协议或者google的proto ...
- [题解][P5206][WC2019] 数树 (op = 1)
简要题意 给定 \(n, y\). 一张图有 \(|V| = n\) 个点,现在给出两棵树 \(T_1=G(V, E_1)\) 和 \(T_2=G(V, E_2)\). 定义这两棵树的权值 \(F(E ...
- 经典!服务端 TCP 连接的 TIME_WAIT 过多问题的分析与解决
开源Linux 专注分享开源技术知识 本文给出一个 TIME_WAIT 状态的 TCP 连接过多的问题的解决思路,非常典型,大家可以好好看看,以后遇到这个问题就不会束手无策了. 问题描述 模拟高并发的 ...
- Wireshark抓包分析TCP“三次握手,四次挥手”
1.目的 客户端与服务器之间建立TCP/IP连接,我们知道是通过三次握手,四次挥手实现的,但是很多地方对这个知识的描述仅限于理论层面,这次我们通过网络抓包的方式来看一下实际的TCP/IP传输过程. 2 ...
- UDP协议,多道技术,进程,同步与异步,阻塞与非阻塞
UDP协议 简介 UDP叫做用户数据报协议,是OSI七层参考模型中传输层使用的协议,他提供的是不可靠传输,既它在传输过程 中不保证数据的完整性! 端口号 UDP使用IP地址和端口号进行标识,以此将数据 ...
- [源码解析] TensorFlow 分布式之 ParameterServerStrategy V2
[源码解析] TensorFlow 分布式之 ParameterServerStrategy V2 目录 [源码解析] TensorFlow 分布式之 ParameterServerStrategy ...