CentOS system rc.local file configuration

CentOS system rc.local file configuration

The company asked to configure startup scripts on two hosts respectively, that is, startup scripts that are automatically executed with the system when the system restarts.

The operating systems of the two hosts are CentOS6.5 and CentOS7, and the versions are different.

After configuration on the host of version 6.5, it can be started normally, but version 7.0 cannot. The reason is that the rc.local file of version 7.0 does not have execution permission by default and needs to be added manually.



cd /etc/rc.d
chmod +x rc.local


rc.local file configuration:
su -c '/mondev/mondo/client/bin/magent restart' mondev &



CentOS operating system View version information Command:

[root@localhost ~ ]# rpm -q centos-release
centos-release-7-1.1503.el7.centos.2.8.x86_64

                                                            2016-12-31 11:47
                 fudoucheng.jiejinzhonglu.shiqiao.panyuqu.guangzhoushi.guangdongsheng

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326387971&siteId=291194637