Couple days ago I wrote an article about MongoDB Enable User Login Authentication and in that article, I used rc.local to optimize system environment setting for mongodb at system start up. But later on I found that rc.local is working as expected cause optimization is not configured after reboot. So after some research on Google and very soon I found the reason. Since CentOS7,
It actually explains all, let’s check the permission before modification. Permission is only
644, no executable permission is given.
In order to make rc.local executable, simply run
1 chmod +x /etc/rc.d/rc.local
And that’s it, reboot your server to confirm if rc.local is running as exepected!