Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Redis Server in Centos 8.0

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to install a Redis server in Centos 8.0", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install a Redis server in Centos 8.0" this article.

1. Download the Linux installation package on the official website

Redis

The landlord uses 6.2.1, the latest is 6.2.6, there is little difference.

two。 Connect to Centos using XShell and Xftp:

Put the redis package in the opt directory.

Drag and drop the file directly to the directory specified by Centos to upload successfully.

Extract the file with the following command

Tar-zxvf redis-6.2.1.tar.gz

After the decompression is complete, go to redis-6.2.1 and use the make command to compile

An error was found and the make command has not been installed yet.

Yum install-y gcc automake autoconf libtool make

Execute the make command again:

If it is displayed as follows: it indicates that it has been successfully installed, and if there is an error, please resolve it patiently.

After the compilation is successful, execute the make install command to install:

Make install

Ok, installed successfully.

3. By default, redis-related installation files are stored in the / usr/local/bin directory

Cd / usr/local/bin

The above verification indicates that redis has been installed successfully.

4. The foreground starts the redis server redis-server

In this way, the current window closes and the service stops. It is not recommended.

You can use Ctrl + C to exit redis's current service.

5. Start the Redis server in the background (recommended) 5.1 copy the redis.conf file

For example, copy to the / etc directory:

Cp redis.conf / etc/redis.conf

Copied:

5.2 modify profile parameters:

Change the background startup setting from daemonize no to yes

Open the redis.conf file with the vi command

Vi redis.conf

Return to the directory where redis-server is located: cd / usr/local/bin

Start the redis server with the following command:

Directory where the redis-server + redis configuration file is located

Redis-server / etc/redis.conf

View the redis process:

Ps-ef | grep redis

We can see that the redis server is turned on and is listening on port 6379.

Use the client to manipulate redis:

Redis-cli

The above is all the contents of the article "how to install Redis Server in Centos 8.0". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report