Redis学习笔记(3)-XShell连接CentOSMini,并安装Redis
使用XShell远程连接CentOSMini
点击download下载XShell5.0。
下载之后安装。配置XShell。
配置XShell前的准备
打开VM,启动CentOSMini。CentOSMini启动之后进入Terminal。
[root@localhost ~]# ip addr
输入命令ip addr ,回车查看inet地址。
切换回Windows,打开CMD,输入命令ipconfig,回车查看IPv4地址。
>ipconfig
比对两个ip地址是否在同一IP段,即IP地址形式如{1}.{2}.{3}.{4},比对1,2,3部分是否相同,相同即为同一IP段,此为XShell连通虚拟机安装的CentOSMini的前提。
配置XShell
打开XShell,点击对话->新建,弹窗如图
输入名称,自己任意起名,这里我起名CentOSMini。
主机框输入,查询到的CentOSMini的inet地址。
端口号,默认22,如果端口被占用可能导致连接失败。
点击用户身份验证,输入CentOSMini的账户和密码
配置完成,尝试连接。如果连接失败,请自行排查原因。
默认连接成功,开始安装Redis。
安转Redis
以下配置,默认用户都未完成,如果已经完成,再次执行不会有影响。
加载插件gcc
[root@localhost ~]# yum gcc
加载插件wget
[root@localhost ~]# yum wget
下载及安装Redis
Redis安装包网址
最新的安装包为redis-3.0.7.tar.gz
[root@localhost ~]#wget http://download.redis.io/releases/redis-3.0.7.tar.gz
[root@localhost ~]#tar zxvf redis-3.0..tar.gz
[root@localhost ~]# cd redis-3.0.
[root@localhost redis-3.0.]# make MALLOC=libc
启动Redis
[root@localhost redis-3.0.]# src/redis-server
:C Apr ::08.132 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
:M Apr ::08.132 * Increased maximum number of open files to (it was originally set to ).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 14891
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' :M Apr ::08.134 # WARNING: The TCP backlog setting of cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of .
:M Apr ::08.134 # Server started, Redis version 3.0.
:M Apr ::08.134 # 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.
:M Apr ::08.134 # 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.
:M Apr ::08.135 * DB loaded from disk: 0.001 seconds
:M Apr ::08.135 * The server is now ready to accept connections on port
测试Redis
在XShell,打开一个新的终端标签
[root@localhost ~]# ls
anaconda-ks.cfg redis-3.0. redis-3.0..tar.gz
[root@localhost ~]# cd redis-3.0.
[root@localhost redis-3.0.]# src/redis-cli
127.0.0.1:> KEYS *
) "user:1"
) "test"
) "Manager"
) "name"
127.0.0.1:>
退出Redis命令行
[root@localhost redis-3.0.]# src/redis-cli
127.0.0.1:> quit
[root@localhost redis-3.0.]#
关闭Redis
Redis命令行下
[root@localhost redis-3.0.]# src/redis-cli
127.0.0.1:> shutdown
非Redis命令行下
[root@localhost redis-3.0.]# src/redis-cli shutdown
Redis学习笔记(3)-XShell连接CentOSMini,并安装Redis的更多相关文章
- redis学习笔记(2)
redis学习笔记第二部分 --配置文件介绍 二,解析redis的配置文件redis.conf常见配置参数说明redis.conf 配置项说明如下:1. Redis默认不是以守护进程的方式运行,可以通 ...
- Redis学习笔记六:持久化实验(AOF,RDB)
作者:Grey 原文地址:Redis学习笔记六:持久化实验(AOF,RDB) Redis几种持久化方案介绍和对比 AOF方式:https://blog.csdn.net/ctwctw/article/ ...
- Redis学习笔记~目录
回到占占推荐博客索引 百度百科 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合). ...
- Redis学习笔记4-Redis配置详解
在Redis中直接启动redis-server服务时, 采用的是默认的配置文件.采用redis-server xxx.conf 这样的方式可以按照指定的配置文件来运行Redis服务.按照本Redi ...
- Redis学习笔记7--Redis管道(pipeline)
redis是一个cs模式的tcp server,使用和http类似的请求响应协议.一个client可以通过一个socket连接发起多个请求命令.每个请求命令发出后client通常会阻塞并等待redis ...
- (转)redis 学习笔记(1)-编译、启动、停止
redis 学习笔记(1)-编译.启动.停止 一.下载.编译 redis是以源码方式发行的,先下载源码,然后在linux下编译 1.1 http://www.redis.io/download 先 ...
- Redis学习笔记(二)-key相关命令【转载】
转自 Redis学习笔记(二)-key相关命令 - 点解 - 博客园http://www.cnblogs.com/leny/p/5638764.html Redis支持的各种数据类型包括string, ...
- Redis 学习笔记4: Redis 3.2.1 集群搭建
在CenOS 6.7 linux环境下搭建Redis 集群环境 1.下载最新的Redis版本 本人下载的Redis版本是3.2.1版本,下载之后,解压,编译(make): 具体操作可以参考我的博文:R ...
- Redis学习笔记(2)——Redis的下载安装部署
一.下载Redis Redis的官网下载页上有各种各样的版本,如图 但是官网下载的Redis项目不正式支持Windows.如果需要再windows系统上部署,要去GitHub上下载.我下载的是Redi ...
- Redis学习笔记(1)- CentOS 6.4 安装Redis
Redis学习笔记(1)- CentOS 6.4 安装Redis 2013.10.13 学习环境 vm 10.1 + 默认.新装的干净 CentOS 6.4 64BIT系统 准备 1 ...
随机推荐
- Note of Python Math
Note of Python Math math 库是Python 提供的内置数学类函数库,而其中复数类型常用于科学计算,一般计算并不常用,因此math 库不支持复数类型.math 库一共提供4个数学 ...
- js读取txt文件
$('#selectAreaFile').on('change',function(e){//用户区域的文件选择 var files=e.target.files; if ...
- Using iSCSI On Ubuntu 10.04 (Initiator And Target)
This guide explains how you can set up an iSCSI target and an iSCSI initiator (client), both running ...
- [转]Rapidly detecting large flows, sFlow vs. NetFlow/IPFIX
Figure 1: Low latency software defined networking control loop The articles SDN and delay and Delay ...
- Icehouse 创建Instance代码分析
1. nova-api接收到request 在/etc/nova/api-paste.ini中,是这样配置nova v2的 [app:osapi_compute_app_v2] paste.app_f ...
- Windows 10 IoT Core 17120 for Insider 版本更新
今天,微软发布了Windows 10 IoT Core 17120 for Insider 版本更新,本次更新只修正了一些Bug,没有发布新的特性.相比于17115,又少了两个已知的问题. 一些已知的 ...
- 【备忘】ASP.NET MVC 5 升级到 ASP.NET Core MVC 的部分变化
正在将一个 .net 4.5 的项目(MVC 5)升级到 .net core 2.1,中间遇到了许多的修改,记在下面,帮大家少走弯路. System.Drawing 下面很多类已经不存在(如Bitma ...
- 你可以这么理解五种I/O模型
因为项目需要,接触和使用了Netty,Netty是高性能NIO通信框架,在业界拥有很好的口碑,但知其然不知其所以然. 所以本系列文章将从基础开始学起,深入细致的学习NIO.本文主要是介绍五种I/O模型 ...
- Hadoop 倒排索引
倒排索引是文档检索系统中最常用的数据结构,被广泛地应用于全文搜索引擎.它主要是用来存储某个单词(或词组)在一个文档或一组文档中存储位置的映射,即提供了一种根据内容来查找文档的方式.由于不是根据文档来确 ...
- Web前端JQuery面试题(三)
Web前端JQuery面试题(三) 1.怎么阻止冒泡过程? stopPropagation(); // 阻止冒泡过程 2.ready()方法和onload()方法的区别? onload()方法要等页面 ...