Linux set to boot from the startup script

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/WilliamsWayne/article/details/91413675

I VM local development environment every vagrant upturn, PHP services, though up, but still needs to restart it, the reason is not clear, because the need to manually enter each boot command line to restart, it is going to write the script of a boot, provincial simple thing. Lazy essential, after all, the world is lazy to drive the (personal opinion).

  1. Create a script somewhere in the Linux system;
    Here Insert Picture Description
  2. Open /etc/rc.local file, edit the last line;
    Here Insert Picture Description
  3. Editorial content is:

source script path / file name of the script

  1. wq save and exit;
  2. vagrant reloadAfter the restart was found true.

Guess you like

Origin blog.csdn.net/WilliamsWayne/article/details/91413675