ホームページ  >  記事  >  運用・保守  >  nginxをアンインストールする方法

nginxをアンインストールする方法

(*-*)浩
(*-*)浩オリジナル
2019-06-11 09:57:135560ブラウズ

この記事では主に、Linux 上にコンパイル・インストールされた nginx をアンインストールする方法を紹介します。

nginxをアンインストールする方法

#nginx を削除します。-purge には構成ファイルが含まれます

sudo apt-get --purge remove nginx

未使用のソフトウェア パッケージをすべて自動的に削除します

sudo apt-get autoremove

nginx に関連するソフトウェアを一覧表示します

dpkg --get-selections|grep nginx
実行結果:

stephen@stephen-OptiPlex-390:~$ dpkg --get-selections|grep nginx
nginx                       install
nginx-common                install
nginx-core                  install

クエリを削除して関連ソフトウェアを見つけますnginx に関連するソフトウェア

sudo apt-get --purge remove nginx
sudo apt-get --purge remove nginx-common

この方法で、設定ファイルを含む nginx を完全にアンインストールできます

nginx の実行中のプロセスを確認し、必要に応じて強制終了します。

 ps -ef |grep nginx
nginx がまだ起動しているかどうかを確認します。通常、1 を実行した後も、次のように nginx はまだ起動しています:

stephen@stephen-OptiPlex-390:~$ ps -ef |grep nginx
root      7875  2317  0 15:02 ?        00:00:00 nginx: master process /usr/sbin/nginx
www-data  7876  7875  0 15:02 ?        00:00:00 nginx: worker process
www-data  7877  7875  0 15:02 ?        00:00:00 nginx: worker process
www-data  7878  7875  0 15:02 ?        00:00:00 nginx: worker process
www-data  7879  7875  0 15:02 ?        00:00:00 nginx: worker process
stephen   8321  3510  0 15:20 pts/0    00:00:00 grep --color=auto nginx

kill nginx process

sudo kill  -9  7875 7876 7877 7879

nginx に関連するファイルをグローバルに検索##

sudo  find  /  -name  nginx*

リストされているすべてのファイルを順番に削除します

#

sudo rm -rf file
これにより、nginx が完全に削除されますNginx 関連の技術記事の詳細については、

Nginx 使用法チュートリアル

列にアクセスして学習してください。

以上がnginxをアンインストールする方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。