美文网首页
CentOS6-7安装Redis服务器教程

CentOS6-7安装Redis服务器教程

作者: 824bb1c71eb9 | 来源:发表于2018-10-13 18:37 被阅读0次

redis的缩写是REmote DIctionary Server。它是最流传的开源,初级key-value存储系统。这里说下CentOS 7上部署redis服务器方式。

项目地址:http://redis.io/

部署

1、部署EPEL

#CentOS/RHEL 6:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

#CentOS/RHEL 7:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

2、部署Redis服务器

1、yum部署redis服务器

yum install redis

两个重要的redis服务器配置文件的路径/etc/redis.conf和/etc/redis-sentinel.conf。

2、启动redis服务器

#CentOS 6

service redis start

#CentOS 7

systemctl start redis.service

3、检查redis服务器的执行状态

#CentOS 6

service redis status

#CentOS 7

systemctl status redis.service

4、测试Redis的部署

redis-cli ping

如果返回成果PONG,则部署成功。

3、redis服务器相关command

#CentOS 6系统

chkconfig redisd on  #开机自启

service redisd stop  #终止redis服务器

service redisd restart  #重新启动redis服务器

#CentOS 7系统

systemctl stop redis.service  #终止redis服务器

systemctl restart redis.service  #重新启动redis服务器 

systemctl enable redis.service  #开机启动redis服务器

systemctl disable redis.service  #开机禁用redis服务器

4、Redis服务器监听端口

Redis Server原始侦听端标语6379,可使用SScommand查看。

ss -nlp|grep redis

念书Redis请看:http://redis.io/documentation

希望以上的文章对各位有用,如果觉得不错给我点个喜欢吧!更多和CentOS6/7安装Redis服务器教程相关的问题或者对洛杉矶云主机有疑惑也欢迎大家咨询。

相关文章

网友评论

      本文标题:CentOS6-7安装Redis服务器教程

      本文链接:https://www.haomeiwen.com/subject/mmtaaftx.html