In the CentOS6 system, adding the boot auto-start item to /etc/rc.local failed to start.

In the CentOS6 system, adding the boot auto-start item to /etc/rc.local failed to start.

In response to project requirements, I need to start my own Redis program at boot time. I took it for granted and directly added the startup command to /etc/rc.local. After restarting, I found that nothing happened... At first, I thought it was a configuration problem, but the result changed. After making it an absolute path, it was still the same. After some searching, I found that it was a permissions issue. I ran chmod a+x /etc/rc.d/rc.local to solve the problem.

In fact, the description of /etc/rc.local has made it very clear that /etc/rc.local is only set up for compatibility. If you want to execute it, you need to add execution permissions to /etc/rc.d/rc.local.

Guess you like

Origin blog.csdn.net/weixin_42602433/article/details/99860910