How to install redis server on CentOS 7 / RHEL 7

How to install redis server on CentOS 7 / RHEL 7

October 4, 2014 by sharad chhetri Leave a Comment

In this tutorial we will learn, how to install redis server on CentOS 7 / RHEL 7 . The abbreviation of redis is REmote DIctionary Server. It is one the of the most popular open source,advanced key-value cache and store.

Project URL : http://redis.io/

Follow the given below steps to install redis server on CentOS 7 and Red Hat Enterprise Linux 7.

Install wget utility

Install wget command

yum install wget

Install EPEL repo

First we will install the EPEL repo. For more detail on EPEL repo, we suggest you to read our this post.

Because our system has x86_64 Operating System architecture, we will use only epel repo package for x86_64 . Search epel repo package as per your Operating System architecture(EPEL URL)

wget -r --no-parent -A ‘epel-release-*.rpm‘ http://dl.fedoraproject.org/pub/epel/7/x86_64/e/

rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm

It will create two epel’s repo file inside /etc/yum.repos.d
These are –
1. epel.repo
2.epel-testing.repo

[[email protected] ~]# ls -l /etc/yum.repos.d/
total 28
-rw-r--r--. 1 root root 1612 Jul  4 07:00 CentOS-Base.repo
-rw-r--r--. 1 root root  640 Jul  4 07:00 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1331 Jul  4 07:00 CentOS-Sources.repo
-rw-r--r--. 1 root root  156 Jul  4 07:00 CentOS-Vault.repo
-rw-r--r--. 1 root root  957 Sep  2 12:14 epel.repo
-rw-r--r--. 1 root root 1056 Sep  2 12:14 epel-testing.repo
[[email protected] ~]#

Install redis server

Now use yum command to install redis server

yum install redis

Two important redis server configuration file’s path
1. /etc/redis.conf
2. /etc/redis-sentinel.conf

Now start the redis server after this.

systemctl start redis.service

Check the running status of redis server

systemctl status redis.service

To test the installation of Redis, use below given command

redis-cli ping

If the response output is PONG, it means installation is completed successfully.

[[email protected] ~]# redis-cli ping
PONG
[[email protected] ~]#

Start/Stop/Restart/Status and Enable redis server

To start redis server

systemctl start redis.service

To stop redis server

systemctl stop redis.service

To restart redis server

systemctl restart redis.service

To get running status of redis server

systemctl status redis.service

To enable redis server at system’s booting time.

systemctl enable redis.service

To disable redis server at system’s booting time.

systemctl disable redis.service

Listening Port Of Redis Server

Redis Server listens by default at port number 6379. Use below given ss command. (To learn more about ss command)

[[email protected] ~]# ss -nlp|grep redis
tcp    LISTEN     0      128            127.0.0.1:6379                  *:*      users:(("redis-server",19706,4))
[[email protected] ~]#

Note: On minimal installed CentOS 7/ RHEL 7,you wont get netstat command. Instead of netstat command, use ss command which is by default available on system.

Learn Redis : http://redis.io/documentation

Who is using redis: Who is using Redis

from: http://sharadchhetri.com/2014/10/04/install-redis-server-centos-7-rhel-7/

时间: 2024-12-22 10:27:44

How to install redis server on CentOS 7 / RHEL 7的相关文章

How to install VNC server on CentOS 6

参考: https://rbgeek.wordpress.com/2012/06/26/how-to-install-vnc-server-on-centos-6/ VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and co

Install Jetty web server on CentOS 7 / RHEL 7

http://www.eclipse.org/jetty/download.html https://blog.csdn.net/finishx/article/details/79010944 https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-jetty-web-server-on-centos-7-rhel-7.html https://linux.cn/article-4792-1.html centos6和7的系统服

Configure VNC Server on CentOS 7 / RHEL 7

The following simple guide help you to setup the VNC server on RHEL 7/CentOS 7 machines, VNC help to share the desktop with the other machines which has a client installed. VNC server and client are not installed by default, you need to setup the vnc

Install Google Chrome on CentOS 7 / RHEL 7

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-google-chrome-37-on-centos-7-rhel-7.html 原文地址:https://www.cnblogs.com/ihibin/p/9073568.html

虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案

今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来: 1. Redis.conf文件中打开了 # By default Redis listens for connections from all the network interfaces# available on the server. It is possible to listen to just on

CentOS+Apache+php无法访问redis的解决方法 Redis server went away

在CentOS下配置Apache+php+redis+phpredis环境.编辑访问redis缓存的php程序test.php,以应用程序方式在后台运行,可成功访问Redis,而在Apache下以网页形式访问时则出错,在访问Redis以及之后的代码均不再执行.查看Apache的日志:/var/log/httpd/error_log,发现代码运行时出现异常:PHP Fatal error: Uncaught exception 'RedisException' with message 'Redi

Install SoftEther VPN Server on CentOS 6.5

Based on CentOS 6.5 x86_64 yum -y install gcc 2. tar zxf softether-vpnserver-v4.10-9473-beta-2014.07.12-linux-x64-64bit.tar.gz 3. cd vpnservermakecd ..mv vpnserver /usr/local/cd /usr/local/vpnserver/chmod 600 *chmod 700 vpnserver chmod 700 vpncmd 4.

Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops

Virtual Networking Computing (VNC) is a Kind of remote sharing system that makes it possible to take control of any other computer connected to internet. Keyboard and mouse clicks can easily transmit from one computer to another. It helps administrat

centos yum install redis

centos yum install redis linux下yum安装redis以及使用 1.yum install redis      --查看是否有redis   yum 源 [[email protected] ~]# yum install redis 已加载插件:fastestmirror base | 3.6 kB 00:00 docker-ce-edge | 2.9 kB 00:00 docker-ce-stable | 2.9 kB 00:00 extras | 3.4 kB