Get the App
SLTechnology News&Howtos  ›  Database  › 

Redis Notes-installation and configuration of Redis (1)

Shulou Source: shulou.com Published: 2022-06-01 12:51:00 10月03日 Update

The general installation part is as follows, there are many online tutorials, abbreviated here

1. Decompression

two。 Enter the src directory

3. Execute the make install command

4. Execute the redis-server command to start

5. Execute the redis-cli command to connect

Redis start and stop

The compiled binaries are located in the src directory of the source code and are named after redis-xxx. Among them: there are 5 executable binaries.

1.redis-benchmark performance testing tool

2.redis-check-aof aof File repair tool

3.redis-check-dump reb File check tool

4.redis-cli command line client

5.redis-server redis server

Method 1: start directly

Add the & sign to make redis run redis-server as a daemon &

Check whether the backend process is stored in ps-ef | grep redis

Check whether port 6379 is listening to netstat-tunpl | grep 6379

Whether you can connect properly using redis-cli

Method 2: specify a profile

Redis-server / usr/local/redis/etc/redis.conf

Method 3: use Redis startup script to set up boot self-startup

It is recommended to use startup scripts to start redis services in a production environment. The startup script redis_init_script is located in the / utils/ directory of Redis.

Configuration steps:

Tags: Configuration file command directory client client data script basic configuration tool method mirror service run binary background address backup database method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Xiaomi OPPO Reno Apple MySQL