Home > Database > Redis > body text

How to use RPM package to install redis in CentOS

WBOY
Release: 2023-05-26 11:47:48
forward
1438 people have browsed it

Redis is a high-performance key-value database. The emergence of redis has largely compensated for the shortcomings of keyvalue storage such as memcached, and can play a very good supplementary role to relational databases in some situations.

How to use RPM package to install redis in CentOS

Preliminary preparation

Platform: centos 6.5 x86_64

Installation: redis-3.0.7-4.el6.art.x86_64. rpm

Download rpm package

Open the address http://pkgs.org/download/redis and enter to download the corresponding rpm package according to your own Linux platform and the redis version that needs to be installed. Here we Take redis 3.0.7 as an example to install:

[root@21yunwei src]#  wget   http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/redis-3.0.7-4.el6.art.x86_64.rpm
Copy after login

Installation

[root@21yunwei src]# rpm  -ivh  redis-3.0.7-4.el6.art.x86_64.rpm
Copy after login

You need to pay attention here. If it is a new system or the jemalloc library is not installed, an error will usually be reported:

[root@21yunwei src]# rpm  -ivh  redis-3.0.7-4.el6.art.x86_64.rpmwarning: redis-3.0.7-4.el6.art.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 4520afa9: NOKEY
error: Failed dependencies:
libjemalloc.so.1()(64bit) is needed by redis-3.0.7-4.el6.art.x86_64
Copy after login

Solution:

yum install epel-release  -y
yum install jemalloc -y
Copy after login

Install again, problem solved:

[root@21yunwei src]# rpm   -ivh    redis-3.0.7-4.el6.art.x86_64.rpmwarning: redis-3.0.7-4.el6.art.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 4520afa9: NOKEY
Preparing...                ########################################### [100%]  1:redis                  ########################################### [100%]
Copy after login

Run and set up auto-start

Start the newly installed redis:

[root@21yunwei src]# /etc/init.d/redis  startStarting redis-server:                                     [  OK  ]
Copy after login

Set up self-start

[root@21yunwei src]# chkconfig  redis on
Copy after login

The redis installed here has not been set or optimized, and is the default; the specific use still needs to be adjusted according to your own business needs or security settings.

The above is the detailed content of How to use RPM package to install redis in CentOS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!