Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the method of installing Redis6 under Centos7

Shulou Source: shulou.com Published: 2022-06-01 00:38:39 09月21日 Update

This article mainly introduces the relevant knowledge of what is the method of installing Redis6 under Centos7, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on the method of installing Redis6 under Centos7. Let's take a look at it.

Installation environment: centos7.9, redis 6.0.8

Babysitter installation tutorial

1. Download the Redis package from the Internet

Wget http://download.redis.io/releases/redis-6.0.8.tar.gz

2. Decompression

Tar-xf redis-6.0.8.tar.gz

3. Enter the decompressed folder

Cd redis-6.0.8

4. Compile redis

Make# compiling redis

If it is found that the final compilation failed

View the version of gcc

Execute the following command to upgrade the gcc version

Yum-y install centos-release-sclyum-y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutilsscl enable devtoolset-9 bash# modifies the environment variable echo "source / opt/rh/devtoolset-9/enable" > > / etc/profilegcc-v

Execute the make command again and you will find that you can compile successfully.

5. Install Redis

Mkdir / usr/local/mysoftwares/redis-p # create installation directory make PREFIX=/usr/local/mysoftwares/redis/ install# installation and specify installation directory

Installation succeeded:

6. Copy the redis configuration file to the redis installation directory

Cp redis.conf / usr/local/mysoftwares/redis/ls / usr/local/mysoftwares/redis/

7. Change to the installation directory

Cd / usr/local/mysoftwares/redis/

8. Start the project (mode 1: foreground)

. / bin/redis-server redis.conf

8. Start the project (mode 2: background mode)

Modify the redis.conf file to change the daemon mode to true

Vim redis.conf

9. Testing

This is the end of the article on "what is the method of installing Redis6 under Centos7". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "what is the method of installing Redis6 under Centos7". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Method mode directory compilation file knowledge success content command version environment article project value babysitter again foreground variable background copy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker macOS OPPO Reno Linux