Home > Database > Redis > body text

How to make redis run in the background

王林
Release: 2021-01-21 09:54:43
forward
4452 people have browsed it

How to make redis run in the background

Introduction:

After we install redis, if we run the redis-server command, the content in the figure below will appear.

(Learning video sharing: redis video tutorial)

How to make redis run in the background

But there is no way to do any operation under this tab, because After using Ctrl c at this time, it becomes like this

How to make redis run in the background

# and then it is closed. So what should I do if I want redis to start in the background?

After installing redis, we can find a file called redis.conf, which is the location of the redis configuration file, as shown in the figure:

How to make redis run in the background

Use the vim command to open the file, as shown in the picture:

How to make redis run in the background

#In fact, students who are good at English can read this configuration document carefully. The ones who will benefit a lot are redis. Everyone should be able to understand how to call this configuration document and give examples. Examples have been given.

The following is about units, and there is an explanation of unit conversion.

Look further down, as shown in the figure:

How to make redis run in the background

You can see that other configuration files can be loaded through include.

Look further down, as shown in the picture:

How to make redis run in the background

The general here is the general configuration. When you see the first configuration item, daemonize, this means It is a program that runs continuously. I don’t know the specific principle, but it just means that it can be configured to be started in the background.

According to the instructions, set daemonize to yes, as shown in the figure:

How to make redis run in the background

Save and exit, start redis, of course, pay attention to the use when starting The configuration file you just configured will work, as shown in the picture:

How to make redis run in the background

After startup, there is not a lot of content as before, because we use background startup, confirm whether To start, you can use the ps -ef|grep redis command, as shown in the figure:

How to make redis run in the background

In this way, redis can be started in the background.

Related recommendations: redis database tutorial

The above is the detailed content of How to make redis run in the background. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!