Linux and Windows installation Redis (detail)

Linux and Windows installation Redis

1.Windows installation tutorial

1.1 Download

https://github.com/MSOpenTech/redis/releases

Enter in github download redis Windows version tarball

We downloaded the files into a new folder Redis (redis I created a folder on the C drive)

1.2 Start Service

Open the window of our Windows version of dos command

You will command window to switch to the directory you redis folder

Run the command redis-server.exe redis.windows.conf

The following screen appears

This time we'll open a new command window, otherwise they can not access the server

1.3 Test

Newly opened command window switch to our redis folder directory

Run redis-cli.exe -h 127.0.0.1 -p 6379

And then click Run

Set the key to set key hello

Remove the key to get Key

Basically we have Windows installed successfully

2.Linux installation tutorial

2.1 Download

Download: https://redis.io/download

Material installation package:

Links: https://pan.baidu.com/s/1JvOSonDbaWJF0TbWTvPk2g
extraction code: zu86
copy the contents of this open Baidu network disk phone App, the operation more convenient oh

2.2 Installation

Your downloaded files are saved in your opt folder

Use the following command to extract

tar -zxvf 文件

cd into the directory after you unpack, perform make, then execute a make install

Our installation is complete

2.3 redis modify configuration files

Under redis redis configuration file located in the installation directory, named redis.conf

We can be modified using vi or vim

2.4 Parameter Description

Then I will write an article explained

2.5Linux start the server service

Redis first need to switch to the install directory cd / usr / local / bin

Start command: ./redis-server /opt/redis-3.2.9/redis.conf

2.6 Linux start the client program

Run the command: ./redis-cli

Congratulations, you have successfully installed the service redis

2.7 firewall command

1) entered into force after the restart
open: chkconfig iptables on
close: chkconfig iptables OFF
2) with immediate effect, after the restart failed
open: service iptables start
shut down: service iptables stop

2.8Redis password security

We can set a profile password by redis parameters, such redis client to connect to the service you need password authentication, so you can make your redis services more secure.

2.8.1 View password authentication

2.8.2 Syntax

2.8.3 Examples

2.3.4 modify the configuration file (permanent)

Redis.conf modify configuration files

Guess you like

Origin www.cnblogs.com/liujunwei/p/11757880.html