Table of Contents
Introduction to Redis:
1. Environment description
2. Installation process
What is a Linux system
Home Database Redis What are the steps to install Redis on Linux system

What are the steps to install Redis on Linux system

May 29, 2023 am 10:01 AM
linux redis

I believe everyone has seen the red envelope grabbing activity of the 2021 Spring Festival Gala. According to statistics, a total of 70.3 billion red envelope interactions and 1.221 billion viewers in the Spring Festival Gala live broadcast room during the Spring Festival Gala. Faced with such a huge traffic, the test adopted by the Volcano Engine The self-developed redis system plays an important role in this.

Introduction to Redis:

Redis is completely open source, complies with the BSD protocol, and is a high-performance key-value database.

Redis and other key – value caching products have the following three characteristics:

  • Redis supports data persistence and can save data in memory on disk. , it can be loaded again for use when restarting.

  • Redis not only supports simple key-value type data, but also provides storage of data structures such as list, set, zset, and hash.

  • Redis supports data backup, that is, data backup in master-slave mode.

1. Environment description

1.Linux operating system

This article uses the deepin 15.7 distribution, download address: https://www.deepin .org/

2.redis installation package

This article uses redis3.0.0, download address: http://download.redis.io/releases/

3.redis Client

This article uses the open source software RedisPlus, download address: https://gitee.com/MaxBill/RedisPlus

2. Installation process

1. Download redis source code package

We use wget to download or go directly to http://download.redis.io/releases/ to download the source code package

2. Unzip the redis source code package

Use the decompression tool or use the tar -zxvf command to decompress

What are the steps to install Redis on Linux system

3. Compile the redis program

What we just downloaded is the source code of redis. We need to compile it before we can use it. Enter the redis installation package directory we just decompressed and use the make command to compile

What are the steps to install Redis on Linux system

Wait for a while for the compilation process , see the following instructions and the compilation is completed

What are the steps to install Redis on Linux system

4. Install the redis program

After the compilation process is completed, it will be generated in the src directory The executable redis program is ready to be installed and used next. You can define the installation directory yourself. Here I installed it to /opt/redis/

What are the steps to install Redis on Linux system

and you can see it. This is a successful installation, but it failed for the first time because the opt directory requires administrator rights. We used sudo to escalate the rights and the installation was successful.

5. Configure the redis service

The first choice is to copy the redis.conf configuration file in the source code package to the installation directory /etc/

What are the steps to install Redis on Linux system

The first choice is to change the redis password and modify /opt/ The requirepass item in redis/redis.conf is commented out by default, which is empty. Here we change it to 123456

What are the steps to install Redis on Linux system

and then modify the ip access. The default is local access. To allow other hosts to access, we modify bind to 0.0.0.0

What are the steps to install Redis on Linux system

Configure redis to start the background service, modify the daemonize item, the default is no, here change to yes is the background startup mode

What are the steps to install Redis on Linux system

6. Start the redis service

Execute /opt/redis/bin/redis-server /opt/redis/etc/redis.conf in the terminal. For convenience, we can write an sh script. After execution, we telnet 6379 and find that it has been started.

What are the steps to install Redis on Linux system

Use ps -ef | grep redis to check whether redis is started.

What are the steps to install Redis on Linux system

Use netstat -lntp | grep 6379 to check whether redis is started. If Yes LISTEN, indicating that the startup is normal and port 6379 is in the listening state

What are the steps to install Redis on Linux system

7. Use the RedisPlus client to connect to redis

Download and install the RedisPlus client End program, click to open and add connection information:

What are the steps to install Redis on Linux system

Then double-click the connection, we see that the connection is successful:

What are the steps to install Redis on Linux system

View redis data, information, configuration, etc. For the specific use of RedisPlus, see https://gitee.com/MaxBill/RedisPlus

What are the steps to install Redis on Linux system

What is a Linux system

Linux is a UNIX-like operating system that is free to use and spread freely. It is a multi-user, multi-task, multi-thread and multi-CPU operating system based on POSIX. Linux can run major Unix tool software, applications and networks. protocol.

The above is the detailed content of What are the steps to install Redis on Linux system. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

How to use the Redis cache solution to efficiently realize the requirements of product ranking list? How to use the Redis cache solution to efficiently realize the requirements of product ranking list? Apr 19, 2025 pm 11:36 PM

How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

Redis's Role: Exploring the Data Storage and Management Capabilities Redis's Role: Exploring the Data Storage and Management Capabilities Apr 22, 2025 am 12:10 AM

Redis plays a key role in data storage and management, and has become the core of modern applications through its multiple data structures and persistence mechanisms. 1) Redis supports data structures such as strings, lists, collections, ordered collections and hash tables, and is suitable for cache and complex business logic. 2) Through two persistence methods, RDB and AOF, Redis ensures reliable storage and rapid recovery of data.

See all articles