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

Installation of redis

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

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

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

Database

Wechat

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

12
Report