Get the App
SLTechnology News&Howtos  ›  Database  › 

Installation of redis

Shulou Source: shulou.com Published: 2022-06-01 22:41:09 11月07日 Update

I. installation environment

II. Installation

1. Download the installation package and install redis

2. Modify configuration and set password

3. Start the service

4. Shut down the service

Third, log in

1. Log in without a password

2. Authentication login 1

3. Authentication login 2

I. installation environment

CentOS Linux release 7.2.1511

Installation version: redis-3.2.10.tar.gz

Install 1. Download the installation package and install rediswget http://download.redis.io/releases/redis-3.2.10.tar.gztar xf redis-3.2.10.tar.gz-C / usr/local/cd / usr/local/redis-3.2.10make # compilation

Modify some file locations for ease of use

Mkdir etc/ bin/ logs/mv src/ {redis-benchmark,redis-check-rdb,redis-cli,redis-sentinel Redis-server} bin/mv redis.conf etc/2, modify configuration, set password to support backend launch sed-I 's#daemonize no#daemonize yes#g' etc/redis.conf modify log file location sed-I' s#logfile "" # logfile / usr/local/redis-3.2.10/logs/redis.log#g' etc/redis.conf configuration login password sed-I "requirepass foobared/requirepass 123456" etc/redis.conf3, start service. / bin/redis-server

The default configuration is used to start redis in this way, and the foreground starts.

. / redis-server. / etc/redis.conf

This way is to specify the corresponding configuration file and start it in the background.

4. Close service 1 > client close redis-cli shutdown2 > login close redis-cli > auth 123456 > shutdownnot connected > exit 3, authentication login 1, password-free login redis-cli2, authentication login-redis-cli-h 127.0.0.1-p 6379-a 1234563, authentication login two Redis-cli > auth 123456

Tags: Login password authentication configuration service file location background method environment foreground customer client log version support login compilation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology macOS Docker Xiaomi