
Because there are many Linux distributions. Redis provides source code developed in C. It needs to be compiled to run, and a c compilation environment is required before compilation.(Recommended learning:Redis video tutorial)
Requires a gcc compilation environment in Linux. The way to install gcc is also very simple. First install the gcc compilation environment. If the server contains a compilation environment, please skip the first step.
Enter the redis installation directorycd /usr/local/redis/bin
Execute the ./redis-server startup command
If you see such an interface, it means that the startup is successful. The default port is 6379

This mode is the front-end startup mode, which will occupy a terminal. We generally use backend startup.
How to connect to redis
1 Enter cd /usr/local/redis/bin/
2 Execute ./redis-cli
If you see the following page, it means the connection is successful. The default connection is the local machine. If you want to connect to other addresses, you can use ./redis-cli -h 192.168.XX.XX -p 6379 to connect.

-h represents ip -p represents port. The default is 6379
For more Redis related technical articles, please visitRedis Getting Started TutorialColumn for learning!
The above is the detailed content of How to connect redis in linux. For more information, please follow other related articles on the PHP Chinese website!
Commonly used database software
What are the in-memory databases?
Which one has faster reading speed, mongodb or redis?
How to use redis as a cache server
How redis solves data consistency
How do mysql and redis ensure double-write consistency?
What data does redis cache generally store?
What are the 8 data types of redis