Home > Backend Development > PHP Tutorial > ubuntu1404 completely delete nginx

ubuntu1404 completely delete nginx

WBOY
Release: 2016-07-29 09:00:16
Original
991 people have browsed it

1. Execute the command first:

1.1 Delete nginx, –purge including configuration files

<code>sudo apt-<span>get</span><span>--purge remove nginx</span></code>
Copy after login

1.2 Automatically remove all unused software packages

<code><span>sudo</span> apt-get autoremove
</code>
Copy after login

1.3 List nginx-related software

<code>dpkg --<span>get</span>-selections|grep nginx</code>
Copy after login
<code>执行<span>1.3</span>的结果:
stephen@stephen<span>-OptiPlex</span><span>-</span><span>390</span>:~$ dpkg <span>--</span>get<span>-selections</span><span>|</span>grep nginx
nginx                       install
nginx<span>-common</span>                    install
nginx<span>-core</span>                  install
</code>
Copy after login

1.4 Delete 1.3 Check out the software related to nginx

<code>sudo apt-<span>get</span><span>--purge remove nginx</span>
sudo apt-<span>get</span><span>--purge remove nginx-common</span>
sudo apt-<span>get</span><span>--purge remove nginx-core</span></code>
Copy after login

In this way, you can completely uninstall nginx including the configuration file

2. Check the running process of nginx, if there is one, kill it

<code>ps -ef <span>|grep nginx</span></code>
Copy after login

See if nginx is still started, generally execute After completing 1, nginx is still starting, as follows:

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

3. kill nginx process

<code><span>sudo</span> kill  -<span>9</span><span>7875</span><span>7876</span><span>7877</span><span>7879</span></code>
Copy after login

4. Global search for files related to nginx

<code><span>sudo</span>  find  /  -name  nginx*</code>
Copy after login

5. Delete all files listed in 4

<code><span>sudo</span> rm -rf file</code>
Copy after login

That’s it Completely deleted nginx

6. Reinstall again

<code><span>sudo</span> apt-get update
<span>sudo</span> apt-get install nginx</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the complete deletion of nginx in ubuntu1404, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template