当前位置:网站首页>CentOS install redis
CentOS install redis
2022-06-23 03:07:00 【Wangxiaoming_ HIT】
Or use yum install Redis
1. download fedora Of epel Warehouse
yum install epel-release
2. install redis
yum install redis
3. see redis state
It needs to be started after installation
# start-up redis service redis start # stop it redis service redis stop # see redis Running state service redis status # see redis process ps -ef | grep redis
4. Set up redis Start up
chkconfig redis on
5. Get into redis service
# Enter the machine redis redis-cli # List all key keys *
6. Firewall open port
# Turn on 6379 /sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT # Turn on 6380 /sbin/iptables -I INPUT -p tcp --dport 6380 -j ACCEPT # preservation /etc/rc.d/init.d/iptables save # centos 7 perform service iptables save
7. modify redis Default port and password
The default port is usually 6379 , But you can also change it to the port you want .
Open profile
vi /etc/redis.conf
Insert picture description here
Modify the default port , lookup port 6379 Change to the corresponding port
Change the default password , lookup requirepass foobared take foobared Change it to your password
Use the configuration file to start
redis-server /etc/redis.conf &
Log in using the port
redis-cli -h 127.0.0.1 -p 6179
Insert picture description here
Enter the password you just entered
auth 111
Insert picture description here
How to close redis
Close with command
redis-cli -h 127.0.0.1 -p 6179 shutdown
Kill the process
ps -ef | grep redis kill -9 XXX
Reference material
- https://www.cnblogs.com/rslai/p/8249812.html
边栏推荐
- PHP code specification
- Build a weather forecast applet using a widget
- Chaoscraft: join your girlfriend in Hackathon show -- Interview with the skate team
- Free upgrade of 2-core 2GB for old generation 1-core 2GB machines below standard S5 and SA2
- What is the difference between JS undefined and null
- Qingdao stadium has made headlines again, but it has nothing to do with sports
- The performance of the new Tokio scheduler is improved by 10 times
- Blue screen and abnormal downtime DMP file and system log collection
- February 1, 2022: painting house II. If there is a row of houses, N in total, each
- Extract NTDs with volume shadow copy service dit
猜你喜欢

5. concept of ruler method

Vulnhub DC-5

How to store, manage and view family photos in an orderly manner?

8. greed

6. template for integer and real number dichotomy

Soft exam information system project manager_ Contract Law_ Copyright_ Implementation Regulations - Senior Information System Project Manager of soft exam 030

Soft exam information system project manager_ Information system comprehensive testing and management - Senior Information System Project Manager of soft test 027
随机推荐
Learning record -- memo on constructors and attributes in C
Reading redis source code (III) initialization and event cycle
Soft exam information system project manager_ Contract Law_ Copyright_ Implementation Regulations - Senior Information System Project Manager of soft exam 030
Docker builds MySQL master-slave
Goframe framework (RK boot): fast implementation of server-side JWT verification
Golang string comparison
How to batch print serial and repeated barcode data
Implementing StdevP function of Excel with PHP
Use ES6 new Target to simulate abstract classes
Flowable refactoring process editor to obtain user information
Reading redis source code (V) master-slave replication and sentinel mechanism
Some people are crazy, others are running away, and open source software is both hot and cold
WPF developer essential control library newbeecoder UI —NbMessageBox
QUIC or TCP
PowerShell automated reinstallation of cloudbase init to version 1.1.2
January 29, 2022: connectives. Give you an array of strings without repeated words
How to generate IATA barcode in batch through TXT file
Learning record -- superficial understanding of unity decoupling
February 1, 2022: painting house II. If there is a row of houses, N in total, each
Summary of website navigation design and website link optimization