当前位置:网站首页>Redis download and installation
Redis download and installation
2022-07-30 07:50:00 【Leo, Fei】
Redis download
The Redis installation package is divided into windows version and Linux version:
Windows version download address: https://github.com/microsoftarchive/redis/releases
Linux version download address: https://download.redis.io/releases/
Installing Redis in Linux
Steps to install Redis on Linux system:
Upload the Redis installation package to Linux
Unzip the installation package, command: ==tar -zxvf redis-4.0.0.tar.gz -C /usr/local==
Install the redis dependent environment gcc, command: ==yum install gcc-c++==
Enter /usr/local/redis-4.0.0, compile, command: ==make==
Enter the src directory of redis to install, command: ==make install==
Description of key files after installation:
/usr/local/redis-4.0.0/src/redis-server: Redis service startup script
/usr/local/redis-4.0.0/src/redis-cli: Redis client script
/usr/local/redis-4.0.0/redis.conf: Redis configuration file

You can see from the startup log that the default port number of Redis is ==6379==.
==Ctrl + C==Stop Redis service
You can connect to the local Redis service through ==redis-cli==. By default, the connection can be successful without authentication.
To exit the client, you can enter the ==exit== or ==quit== command.
Redis configuration file
We have started the Redis service earlier. By default, Redis runs in the foreground after it is started, and the client can connect to the Redis service without a password.If we want the Redis service to run in the background after it is started, and we hope that the client can only connect to the Redis service after passing the authentication, what should we do?
At this point, you need to modify the Redis configuration file:
Redis configuration file in Linux system: REDIS_HOME/redis.conf
Redis configuration file in Windows system: REDIS_HOME/redis.windows.conf
The following configuration can be done by modifying the Redis configuration file:
1)Set the Redis service to run in the background
Change the ==daemonize== configuration item in the configuration file to yes, and the default value is no.
Note: Redis for Windows does not support running in the background.
2)Set Redis service password
Uncomment the ==# requirepass foobared== configuration item in the configuration file, the default is the commented state.foobared is the password, which can be specified according to the situation.
3)The setting allows clients to connect to the Redis service remotely
By default, the Redis service can only connect the client locally, and does not allow the client to connect remotely.Comment out the ==bind 127.0.0.1== configuration item in the configuration file.
Explanation:
==#== in the Redis configuration file indicates a comment
The configuration items in the Redis configuration file cannot have spaces in front of them and need to be written in the top box
daemonize: It is used to specify whether redis should be started as a daemon thread. When set to yes, it means that the daemon mode is enabled.In this mode, redis will run in the background
requirepass: set the connection password of Redis
bind: If bind is specified, it means that only Redis requests from the specified network card are allowed.If not specified, it means that Redis requests from any network card can be accepted.
Note: After modifying the configuration file, you need to restart the Redis service configuration to take effect, and the specified configuration file that needs to be displayed when starting the Redis service:
1) Start the Redis service in Linux
# Enter the Redis installation directorycd /usr/local/redis-4.0.0# Start the Redis service and specify the configuration file to use./src/redis-server ./redis.conf边栏推荐
- debian vsftpd + ssl
- 事件传递和响应者链条
- SE_01
- Polygon 3D(三维平面多边形)的法向量的计算(MeshLab默认的计算)
- Multithreading basics (multithreaded memory, security, communication, thread pools and blocking queues)
- 测试开发工程师成长日记008 - 浅谈一些Bug/用例管理平台/协作平台
- How to save modelsim simulation data as a file
- 矩阵的行列式的计算及其源码
- 测试开发工程师成长日记018 - 测试面试必备题记录(持续更新)
- 你被MySQL 中的反斜杠 \\坑过吗?
猜你喜欢

Application of graph computing in network security analysis

多线程进阶(CountDownLatch,死锁,线程安全集合类)

Multithreading basics (multithreaded memory, security, communication, thread pools and blocking queues)

事件传递和响应者链条

Mastering JESD204B (1) – Debugging of AD6676

空间顶点到直线的距离计算及其源码

Rodrigues:旋转矩阵的向量表达

Linx常见目录&文件管理命令&VI编辑器使用 介绍

prometheus-basic_auth加密配置

Test Development Engineer Growth Diary 018 - Record of Required Questions for Test Interview (Continuous Update)
随机推荐
05-Theos
Graph Computing 101: Types, Languages, and Systems of Graph Computing
Dachang's annual salary of 50w+ recruits test engineers with test platform development capabilities
Linx常见目录&文件管理命令&VI编辑器使用 介绍
Test Development Engineer Growth Diary 001 - Some Introduction to Agile Testing, CI/CD/CT, DecOps
How to save modelsim simulation data as a file
测试开发工程师成长日记002 - 从0开始做接口自动化
MySql connecting to the server remotely
计算矩阵的逆源码(使用伴随矩阵,3×3的矩阵)
Rapidly develop GraphScope graph analysis applications
MongoDB-CUD without R
Test development engineer diary 002 - starting from 0 interface automation
matlab机器学习_01
Network Protocol 04 - Physical and Data Link Layers
02-Use of Cycript
Shortcut keys commonly used in the use of Word
引导过程与服务控制
使用Apifox测试套件自动化测试接口
Local Implicit Grid Representations for 3D Scenes详解
GadgetInspector principle analysis