Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
誤ってコマンドを適用してしまいましたが、
sudo rm -rf /etc/init.d/apache2 restart
その後、apache2を実行できません
どうすればこれを解決できますか?
Apache2 がシステム パッケージの一部としてインストールされている場合 (たとえば、Debian apt-get を使用)、パッケージを削除して再インストールすることで元に戻すことができるはずです (たとえば、再インストール オプションを使用するとは思いません。構成ファイルに触れます)。ソース パッケージを取得し、その中の init.d ファイルを見つけてコピーすることもできます。