linux起動後にスクリプト(/etc/rc.localファイル)を実行

428 ワード

linuxの下に/etc/rcがあります.localファイル
コメントは次のとおりです.
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

ファイルを変更する役割は、すべてのシステム初期化スクリプトの実行が完了した後、このコマンドスクリプトを実行することです.そのため、一部のシステムの初期化コマンドは、このファイルに置くことができます.
例えばLNMPの起動、機器の故障が再起動した後にサーバーが起動することを忘れることを避けることによる故障