当前位置:网站首页>Redis installation under windows and Linux systems
Redis installation under windows and Linux systems
2022-07-03 15:51:00 【I have no ice to fall】
One 、redis install
1、Windows System installation
- Installation package download , link :
https://pan.baidu.com/s/13A1mDApAct31bYyRXOfaNg?pwd=l7kq
Extraction code :l7kq - decompression
2、Linux System installation
- Installation package download
https://download.redis.io/releases/, Or I have Baidu online disk :
link :https://pan.baidu.com/s/1Z0LGJewCnVQidZLbTixPzQ?pwd=qxlv
Extraction code :qxlv - Upload the installation package to Linux System , I use it
finalshellUpload
- Unzip the installation package
tar -zxvf redis-4.0.0.tar.gz -C /usr/local - Install build dependency
yum install gcc-c++ - compile redis, Enter the redis Below directory , Execute command compilation :
make - Into it src Catalog , perform :
make install
Two 、 Start and connect
1、Windows System
- start-up : Click on redis-server.exe, Or the command line goes to redis Under the table of contents , perform redis-server
- Connect : Click on redis-cli.exe, Or command line entry redis Under the table of contents , perform redis-cli
2、Linux System
- Start the service : Enter redis Of src Under the table of contents , Carry out orders :
./redis-server. After installation, the service runs in the foreground by default , Configure the background to run in redis and src The peer directory has aredis.configfile , The inside ofdaemonizeChange the parameter to yes - Connect : Enter redis Of src Under the table of contents , Carry out orders :
./redis-cli
3、 ... and 、 Modify the permissions
1、Windows System
- Change Password : open
redis.windows.configfile , findrequirepass foobared, End its comments , Put the back of foobared Replace it with your password . Or connection redis, Enter the command :config set requirepass 1234, appear OK The modification was successful , Connect later redis Enter command when :redis-cli -a password. - Open connection permission : stay
redis.windows.configFound in filebind 127.0.0.1, Just comment it out .
2、Linux System
- Change Password : stay
redis.confFile to findrequirepass foobared, End its comments , Put the back of foobared Replace it with your password . First turn off all services and then restart the services , By order :redis-cli -a passwordConnect - Open connection permission : Found in configuration file :
bind 127.0.0.1, Comment it out , Because no comment represents the default local connection . Restart the service , If you still cannot connect, the port may not be open , to open up 6379 port :firewall-cmd --zone=public --add-port=6379/tcp --permanent, Refresh :firewall-cmd --reload, Can pass :firewall-cmd --zone=public --list-portsCheck whether the port is opened successfully , Now other servers can connect to this redis 了 .
边栏推荐
猜你喜欢

Halcon and WinForm study section 1

Jvm-08-garbage collector

App移动端测试【3】ADB命令

Jvm-04-runtime data area heap, method area

Seckill system 2 redis solves the problem of distributed session

Secsha system 1- login function

子类隐藏父类的同名函数

Popular understanding of linear regression (II)

Concurrency-01-create thread, sleep, yield, wait, join, interrupt, thread state, synchronized, park, reentrantlock

Microservice - fuse hystrix
随机推荐
首发!!lancet饿了么官方文档
Popular understanding of linear regression (II)
请做好3年内随时失业的准备?
Download and install common programs using AUR
Visual upper system design and development (Halcon WinForm) -4 Communication management
Calibre LVL
String functions that you need to know
Introduction, use and principle of synchronized
Go语言自学系列 | golang中的if else语句
Go language self-study series | if else if statement in golang
Popular understanding of gradient descent
Tensorflow realizes verification code recognition (III)
App mobile terminal test [5] file writing and reading
Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
leetcode_ Power of Four
How to use annotations such as @notnull to verify and handle global exceptions
App移动端测试【4】apk的操纵
Detailed explanation of four modes of distributed transaction (Seata)
VS2017通过IP调试驱动(双机调试)
[combinatorial mathematics] binomial theorem and combinatorial identity (binomial theorem | three combinatorial identities | recursive formula 1 | recursive formula 2 | recursive formula 3 Pascal / Ya