Home > Database > Redis > What are the relevant commands to start redis under server linux?

What are the relevant commands to start redis under server linux?

PHPz
Release: 2023-05-28 17:22:14
forward
1747 people have browsed it

1. Download the installation package from the redis official website

2. Upload the installation package to FianlShell

3. Create the corresponding file path and switch to the folder where the installation package is located

Input command: (the path inside will be changed according to the actual situation)

tar -zvxf redis-6.0.5.tar.gz -C /urs/local/redis
Copy after login

4. Compile: (need to use gcc, if linux has not installed gcc, you need to install it first)

Use command :

yum install gcc-c++
Copy after login

5, then enter redis-6.0.5, then execute make

6, then enter the installation command:

make PREFIX=/urs/local/redis install
Copy after login

7, the command to start redis on the client ( Enter redis-6.0.5, then enter src and type the following command inside):

./redis-cli
Copy after login

8. The command to start redis in the background (also type the command under src):

./redis-server
Copy after login

can be modified The configuration of redis.conf allows redis to start as a daemon process:

Enter:

vim redis.conf
Copy after login

Enter the configuration file, find daemonize no, change no to yes, so that there will be no problem after startup Graphical interface.

If you need to connect remotely, you can cancel the protected mode, set protected-mode to no, and comment bind at the same time, so that there will be no restrictions on the connected host and you can connect remotely.

9. Check the running status of redis:

ps -ef|grep redis
Copy after login

The above is the detailed content of What are the relevant commands to start redis under server linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template