The/etc/rc. local Solution for centos7 will not be executed at startup

Source: Internet
Author: User

The/etc/rc. local Solution for centos7 will not be executed at startup
Recently, it was found that centos7's/etc/rc. local won't be started, so I carefully read the/etc/rc. local file and found the cause of the problem #! /Bin/bash # this file is added for compatibility purposes # It is highly advisable to create own using EMD services or udev rules # to run scripts during boot instead of using this file. # In constrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # Please note that you must run 'chmod + x/etc/rc. d/rc. local' to ensure # that this script Will be executed during boot. Translation: # This file is added for compatibility issues. # We strongly recommend that you create your own systemd service or udev rules to run scripts at startup instead of using this file. # This script will not be executed after all other services compared with the parallel execution during previous version boot. # Remember, you must execute "chmod + x/etc/rc. d/rc. local" to ensure that this script is executed during boot. So I confirmed the permission for/etc/rc. local [root @ localhost ~] # Ll/etc/rc. locallrwxrwxrwx. 1 root 13 August 12 06:09/etc/rc. local-> rc. d/rc. local [root @ localhost ~] # Ll/etc/rc. d/rc. local-rw-r --. 1 root 477 June 10 13:35/etc/rc. d/rc. local/etc/rc. d/rc. local has no execution permission, so chmod + x/etc/rc is executed according to the description. d/rc. /etc/rc is found after local restart. local can be executed. It looks like the version changes./etc/rc. local/etc/rc. d/rc. local is on the road of discarding.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.