Redis install Linux and Window

redis file address

https://pan.baidu.com/s/1hfGpvoikJgKBSREH4eQtTQ
extraction code: dg8e
Here Insert Picture Description
two files .tar.gz installation package is environment linux

Redis installed under the window

Here Insert Picture Description
Decompress compressed package labeling,
Here Insert Picture Description
run redis-servicer.exe
Here Insert Picture Description
installed successfully!

Redis installed under the linux

Under local linux entry into the installation package usr
Here Insert Picture Description
view the results
Here Insert Picture Description
decompression redis

 tar -xvf redis-4.0.9.tar.gz

Extracting archive delete redis after completion (this step can not do)

rm -rf redis-4.0.9.tar.gz 

ls view the following local folder into the folder
Here Insert Picture Description
compile and install:
After entering the folder execute redis

make
make install PREFIX='/usr/local/redis-4.0.9/6379'

Start:
enter the directory which /usr/local/redis-4.0.9/6379/bin

 ./redis-server

Appears below the picture, do not worry no good end
Here Insert Picture Description
modify redis configuration file, the default redis native access only, and does not support running in the background
to the configuration file in the directory /usr/local/redis-4.0.9/ copy to the 6379 directory under

cd /usr/local/redis-4.0.9/
cp redis.conf /usr/local/redis-4.0.9/6379/bin/

Change setting

cd 6379/bin
vim redis.conf

Modify three
1. # bind 127.0.0.1 # this line of code comments, listen to all ip addresses outside the network can access
2.protected-mode no # yes put into no, allow external network access
3.daemonize yes # put no into a yes, running in the background

Changes are complete
restart

./redis-server redis.conf
ps -ef|grep redis

The second sentence is to see whether the current start redis
Here Insert Picture Description
represent the start and the port number is 6379

Published 47 original articles · won praise 6 · views 2187

Guess you like

Origin blog.csdn.net/weixin_44467251/article/details/103289380