使用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的更多相关文章

  1. redis学习笔记(2)

    redis学习笔记第二部分 --配置文件介绍 二,解析redis的配置文件redis.conf常见配置参数说明redis.conf 配置项说明如下:1. Redis默认不是以守护进程的方式运行,可以通 ...

  2. Redis学习笔记六:持久化实验(AOF,RDB)

    作者:Grey 原文地址:Redis学习笔记六:持久化实验(AOF,RDB) Redis几种持久化方案介绍和对比 AOF方式:https://blog.csdn.net/ctwctw/article/ ...

  3. Redis学习笔记~目录

    回到占占推荐博客索引 百度百科 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合). ...

  4. Redis学习笔记4-Redis配置详解

    在Redis中直接启动redis-server服务时, 采用的是默认的配置文件.采用redis-server   xxx.conf 这样的方式可以按照指定的配置文件来运行Redis服务.按照本Redi ...

  5. Redis学习笔记7--Redis管道(pipeline)

    redis是一个cs模式的tcp server,使用和http类似的请求响应协议.一个client可以通过一个socket连接发起多个请求命令.每个请求命令发出后client通常会阻塞并等待redis ...

  6. (转)redis 学习笔记(1)-编译、启动、停止

    redis 学习笔记(1)-编译.启动.停止   一.下载.编译 redis是以源码方式发行的,先下载源码,然后在linux下编译 1.1 http://www.redis.io/download 先 ...

  7. Redis学习笔记(二)-key相关命令【转载】

    转自 Redis学习笔记(二)-key相关命令 - 点解 - 博客园http://www.cnblogs.com/leny/p/5638764.html Redis支持的各种数据类型包括string, ...

  8. Redis 学习笔记4: Redis 3.2.1 集群搭建

    在CenOS 6.7 linux环境下搭建Redis 集群环境 1.下载最新的Redis版本 本人下载的Redis版本是3.2.1版本,下载之后,解压,编译(make): 具体操作可以参考我的博文:R ...

  9. Redis学习笔记(2)——Redis的下载安装部署

    一.下载Redis Redis的官网下载页上有各种各样的版本,如图 但是官网下载的Redis项目不正式支持Windows.如果需要再windows系统上部署,要去GitHub上下载.我下载的是Redi ...

  10. Redis学习笔记(1)- CentOS 6.4 安装Redis

    Redis学习笔记(1)- CentOS 6.4 安装Redis 2013.10.13     学习环境 vm 10.1 + 默认.新装的干净 CentOS 6.4  64BIT系统     准备 1 ...

随机推荐

  1. WSGI协议以及对服务器的影响

    下面的内容纯属个人学习心得,如果对于我的观点有疑问,敬请留言,我将虚心向大牛学习. WSGI的全称是WEB SERVICE GATEWAY INTERFACE.WSGI 不是服务器,不是API,也不是 ...

  2. 【python-appium】appium 关键字

    Appium 服务关键字 关键字 描述 实例 automationName 你想使用的自动化测试引擎 Appium (默认) 或 Selendroid platformName 你要测试的手机操作系统 ...

  3. noip第27课资料

  4. noip第28课资料

  5. Oracle数据库基本查询语句

    --数据库连接 --普通用户连接:Conn scott/tiger --超级管理员连接:Conn "sys/sys as sysdba" --Disconnect; 断开连接 -- ...

  6. ios uibutton加数字角标

    http://www.jianshu.com/p/0c7fae1cadac 第一种:https://github.com/mikeMTOL/UIBarButtonItem-Badge第二种:https ...

  7. Android中实现gif动画

    一.需求 Android本身没有提供直接显示gif动画的相关控件,因此需要自定义GifImageView类来实现gif的播放,主要是使用的Movie类来解决的. 二.自定义GifImageView p ...

  8. redis主从架构,分片集群详解

    写在前面:这篇笔记有点长,如果你认真看完,收获会不少,如果你只是忘记了相关命令,请翻到末尾. redis的简单介绍: 一个提供多种数据类类型储存,整个系统都在内存中运行的, 定期通过异步的方式把数据刷 ...

  9. SpringBoot 项目打包后运行报 org.apache.ibatis.binding.BindingException

    今天把本地的一个SpringBoot项目打包扔到Linux服务器上,启动执行,接口一访问就报错,但是在本地Eclipse中启动执行不报错,错误如下: org.apache.ibatis.binding ...

  10. Python 游戏之旅(Pygame)

    Pygame是跨平台Python模块,专为电子游戏设计,包含图像.声音.建立在SDL基础上,允许实时电子游戏研发而无需被低级语言(如机器语言和汇编语言)束缚.基于这样一个设想,所有需要的游戏功能和理念 ...