Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Resolve the problem of redis service startup failure

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Recently, I learned redis and encountered various pits. Share them here.

I made redis backstage.

Installation, configuration environment variables are omitted.

Make it a background service. First, cd to the installation directory of redis, then cd to util, and then execute

./ install_server.sh

Then modify the service name, change the original redis_6379 name to redisd, so that the next time it is more convenient to start, the command is as follows:

cd /etc/init.d/ mv redis_6379 redisd

Then you can start the redis service.

service redisd start

After starting, you can enter the redis client.

redis-cli

Is everything okay here? It seems that the pit is not over. The next day, when I restart the virtual machine and start the redis service again, I am told that the startup failed.

3389:C 29 May 09:31:49.331 # Fatal error, can't open config file 'y'

There is a problem with the configuration file, so the redis service cannot be started.

Obviously, when starting this time, redis started with the default configuration file, and did not start according to the configuration file we modified. Configuration file modification

First cd to our redis installation directory

Open redis.conf with vi editor

We're going to see a line,

No, changed to yes.

Then cp the file to etc directory, and then, when running, do not directly run his default configuration, but run our modified configuration file.

redis-server /etc/redis.conf

Eventually, the problem was solved.

The above article to solve the problem of redis service startup failure is all the content shared by Xiaobian to everyone, I hope to give you a reference, and I hope you can support it a lot.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report