Ubuntu使用apt安装和卸载nginx

请输入图片描述

姑且就当做记事本写了。
今天手头上有个4核4G内存的测试用云主机,顺手装了Ubuntu 16.04 64位的系统。

首先安装如下

apt-add-repository ppa:nginx/development
apt-get update
apt-get install nginx

即可安装成功,访问IP的80口能提示:

Welcome to nginx! If you see this page, the nginx web server is
successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

卸载方式如下

删除nginx,保留配置文件

apt-get remove nginx

删除配置文件

rm -rf /etc/nginx

或者用以下方法

删除nginx连带配置文件

apt-get purge nginx # Removes everything.

卸载不再需要的nginx依赖程序

apt-get autoremove
Last modification:November 10th, 2017 at 12:05 am
If you think my article is useful to you, please feel free to appreciate

One comment

  1. 伊撒尔

    测试一下下gravatar的头像(⊙o⊙)…

Leave a Comment