linux环境下安装redis服务器:

redis下载地址:http://redis.io/download

$ wget http://download.redis.io/releases/redis-3.2.1.tar.gz
$ tar xzf redis-3.2.1.tar.gz
$ cd redis-3.2.1
$ make
$ src/redis-server
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
 

启动redis的方法:

首先进入redis安装目录:cd  /usr/local/redis/bin

然后执行:./redis-server /usr/local/redis/etc/redis.conf

如图:aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtUAAADACAIAAABEVQg9AAAgAElEQVR4nO2du8HrOM6G3cAfTzrhSTf8XMEJN5sKVn1sBeMCpg4lW4qK8R9YF5DECwK6WLT1Psk5n0yBIEWREHjB7Vmh72632+3+GKY/xv8+n8Mw/uc5PO7z5b673boeyZl/ypINj/tNv69geNyFEmkGUolEWkC+EChzSRQeHvfpD7u8LwnD464qrFxM6rL4e3jc59xQPYDnguRb5VX1z3WQdQ7rv6wnVG8efdJ2iOXj9tZiefPSg/RAH6R/JqfvkvbjlyMyd5Wj7273+5LDnC9sz+Eqstu5plD0eYXaA3wf9XKhegD5bm1OhLTIrZYgbejgTReJLPMgMzhWvT+oryn13PZ6Do97IgDZH87yVuWL61JcXtxZrLvPzXJB95nlhfcvFVGr/1we7q49+pSlqHTQhUKtlVfLV0vv0ye7YfpBDGhhOUH67tb1y7g62R+wPW/K2nFn9HlF24PxPmqiYD248nW9/IQ0z2J/jB+MM+r3fWm15+nTX5aLe9kf4P1Uhu1NvWjhnED2x/y3Xd6qfClK/AS7RUM+fi6lfKhPxY8luD8GR/3Dj0BNyao+m+2PdsoL3juUHuhjtIdkjEz8IjE5MUaDY7JAJvvDekzRrM12rqQNPa9ge7CU135a8V4vv2z/uiKkCYL+j/QdqPUcucvzQP/HvvaH4pxI9I+Xtypf/LTJ/1F7Lup9tfLW7l87HovfEplVfUppIfujtfJWkOl9/r/it/tjEHMvK+VESCZcbl23t//D0/9kyXexP6z37kj/h7hnfJyEfDwu+yOZaxB+kWTqc+xt+t7VuWQdg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BsYL2h/X5lz/x/wJ3Xe3+WDzclhwGfyq9hlaY+8Sr8g2/4f4w/Z/lA4NWKzgW5gmV02+jf6PWBw4E0WG73sOXY75lfxepTJ95fmi+0db1rIQ63Igtfo0Bgfpkof5Gs98q/8jMbK9/o/W2o+ij/FFFPd/tFZeXUX6P4iXtfYHnM9D1/OfjGtG/pW32X45Mj9C0iUKt4VqfzjKm9lOrz+N75tUYb2eXd7qQr60gWrPM2x/9OGdt69PMXXcK0WY8xdgXln6nCr2lhXnSQOnB/qYMvvX6uZyfUBQDhRvzbsn7ROWyx5/8CPPWyrsB4z3Qtp2Hvujtfaj1g+ewNBfblA/SP6J5dXfa6A/ag+0Py7NavvjmfpLZRJ0PXEKpnOTwOma52+4//OfVPnZxXQsuXW9YX9gRcWMSlZ/mkNZluf1u+FvXzHd0S8beNTUW+2PIRgH7on6KfAxbXU6aX2WUxgb4zwFssQ/2p2mPijE5QDZ0IFWtE9YLtO9aCikDKbwxdYnWpbG7ovz11r7wfVjVrYiSq+f1sqLvyt0/fX2QPvj0rRw/hhpmWL+ZTe5h4i9LCec+XEqV9OntfISsp3mz18n53BwU+hbOhPuCzi6Plt7XlfTp7XyErIHjD9HCCGEkHfTvP8jukehdY6e1KzJ99ZnG02BE4KEEPKl/D/rN4QxOZArcwAAAABJRU5ErkJggg==" alt="" />

1、在安装好后redis,我们通常是可以直接通过本机操作,但是远程连接会出问题,连接不上?
答:此时,我们需要排除端口是否被 防火墙屏蔽等等,这些是基本的东西。然而在redis中默认是只能本机连接该端口,因此我们需要在redis.cof中将bind 127.0.0.1注释掉或者改为0.0.0.0,
一个小技巧
通过命令netstat -anp|grep 6379
我们看到显示:127.0.0.1:6379表示,只允许127.0.0.1绑定到6379端口,而不允许其他主机去连接到6379,如果我们注释掉后,
会发现该显示改为:*:6379,表示允许任何主机连接到6379.
另一个小技巧
telnet 这个命令也是很有用的,我们可以通过ping 来看某个ip是否开启,而通过telnet来查看某个端口是否可用,比如:输入
telent 192.168.1.8 6379 如果该端口不可用,则会显示连接不上主机的端口号,如果可以连接上,则会显示出一个黑屏,而不会报错。

注意:通过telnet 192.168.1.8 6379 可以直接访问redis数据库,如果设置了密码 通过命令 auth ‘密码’,即可

2、另外,在远程连接redis时,又出了一个错误,报安全模式错误,不能读写redis?
答:这是因为我们没有给redis设置密码,所以一个很简单的方法,只要在装linux主机的机器中,输入redis -cli 后,输入auth 密码 ,在另一台linux主机上也输入授权auth 密码,则可以正常操作linux。

linux服务器之redis的更多相关文章

  1. linux服务器之LVS、Nginx和HAProxy负载均衡器对比

    linux服务器之LVS.Nginx和HAProxy负载均衡器对比. LVS特点:  1.抗负载能力强,使用IP负载均衡技术,只做分发,所以LVS本身并没有多少流量产生:  2.稳定性.可靠性好,自身 ...

  2. Session服务器之Redis

    Session服务器之Redis Redis与Memcached的区别内存利用率:使用简单的key value (键值对)存储的话,Mermcached 的内存利用率更高,而如果Redis采用hash ...

  3. Linux服务器之SSH

    SSH 1.ssh是安全的加密协议,用于远程连接linux服务器. 2.ssh默认端口是22,安全协议版本ssh2. 3.ssh服务端主要包含两个服务功能ssh远程连接,sftp服务. 4.linux ...

  4. linux服务之redis

    redis wget http://download.redis.io/releases/redis-4.0.6.tar.gzcd redis-4.0.6makecd src/./redis-serv ...

  5. XPS1330 作为Linux服务器之安装配置计划

      # Task 状态 完成时间 备注 博文链接  1.  打通SSH  未开始  --  安装系统后已经具备  --  2.  打通FTP  未开始  --  安装系统后已经具备  --  3.   ...

  6. 网安等保-Linux服务器之最新Ubuntu-22.04-LTS系统内核优化与安全加固配置脚本使用分享

    关注「WeiyiGeek」公众号 设为「特别关注」每天带你玩转网络安全运维.应用开发.物联网IOT学习! 希望各位看友[关注.点赞.评论.收藏.投币],助力每一个梦想. 本章目录 目录 0x00 前言 ...

  7. linux服务器之LVS、Nginx和HAProxy负载均衡器对比总结

    LVS特点: 1.抗负载能力强,使用IP负载均衡技术,只做分发,所以LVS本身并没有多少流量产生: 2.稳定性.可靠性好,自身有完美的热备方案:(如:LVS+Keepalived) 3.应用范围比较广 ...

  8. Session服务器之Memcached与Redis

    安装Memcached[root@nginx ~]# yum -y install libevent memcached 指定用户大小等信息,工作环境中常指定大小一般为4到8G,此信息测试使用.[ro ...

  9. Xbin-Store(分布式商城)项目所用Linux服务系列 FastDFS安装(五)

    系列 Xbin-Store(分布式商城)项目所用Linux服务系列 MySQL安装(一) Xbin-Store(分布式商城)项目所用Linux服务系列 Redis集群安装(二) Xbin-Store( ...

随机推荐

  1. Windows平台分布式架构-负载均衡(高并发)

    缘由 单纯想在winodows平台部署分布式程序,微软在IIS扩展的介绍中有涉及到Application Request Router + Web Farm + Url Rewriter可以实现分布式 ...

  2. redhat 挂载 iso文件 提示 mount :not a directory

  3. ECMAScript 6 入门学习笔记(持续更新)

    1.let命令(作用同var) ES6新增了let命令,用来声明变量.它的用法类似于var,但是所声明的变量,只在let命令所在的代码块内有效. { let a = 10; var b = 1; } ...

  4. 转】MyEclipse使用总结——MyEclipse去除网上复制下来的来代码带有的行号

    原博文出自于: http://www.cnblogs.com/xdp-gacl/p/3544208.html 感谢! 一.正则表达式去除代码行号 作为开发人员,我们经常从网上复制一些代码,有些时候复制 ...

  5. 为什么在Spring的配置里,最好不要配置xsd文件的版本号

    为什么dubbo启动没有问题? 原文链接:http://www.tuicool.com/articles/YRn67zM 这篇blog源于一个疑问: 我们公司使了阿里的dubbo,但是阿里的开源网站h ...

  6. SQL SERVER安装提示“安装了 Microsoft Visual Studio 2008 的早期版本

    工作共遇到的问题记录: 安装Sql Server 2008 R2时提示错误:“此计算机上安装了 Microsoft Visual Studio 2008 的早期版本.请在安装 SQL Server 2 ...

  7. ASA与PIX的区别

    很多年来,Cisco PIX一直都是Cisco确定的防火墙.但是在2005年5月,Cisco推出了一个新的产品——适应性安全产品(ASA,Adaptive Security Appliance).不过 ...

  8. Windows 7 不同安装模式简要区别(图解)

    ★ 你可能对GHOST不支持AHCI感到迷惑,实际上,写过GHOST一键安装批处理的都知道一个叫FINDCD.EXE的小程序,可是这个程序老 了,AHCI模式光驱他找不到了,找不到光驱动意味着光盘中G ...

  9. UVa 1620 Lazy Susan (找规律)

    题意:给 n 个数,每次可以把4个连续的数字翻转,问你能不能形成1-n的环状排列. 析:找一下奇偶性,写几个数试试,就会找到规律. 代码如下: #include <cstdio> #inc ...

  10. CreateWaitableTimer和SetWaitableTimer函数(定时器)

    用户感觉到软件的好用,就是可以定时地做一些工作,而不需要人参与进去.比如每天定时地升级病毒库,定时地下载电影,定时地更新游戏里的人物.要想 实现这些功能,就可以使用定时器的API函数CreateWai ...