Home > Backend Development > PHP Tutorial > Use apt method to install and uninstall nginx under ubuntu

Use apt method to install and uninstall nginx under ubuntu

WBOY
Release: 2016-07-28 08:27:11
Original
1312 people have browsed it

The apt method of installing software under ubuntu and debain is very convenient, especially for novices to install and uninstall nginx.
Since nginx cannot add modules dynamically, it will be frequently installed, uninstalled, and upgraded.

  • apt install nginx method
<code>sudo apt<span>-add</span><span>-repository</span> ppa:nginx/development
sudo apt<span>-get</span> update
sudo apt<span>-get</span> install nginx</code>
Copy after login
  • apt uninstall nginx method

uninstall method 1.
Delete nginx, keep the configuration file

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

Delete the configuration file

<code>rm <span>-rf</span> /etc/nginx</code>
Copy after login

Uninstall method 2.
Delete nginx associated configuration files

<code><span>sudo</span> apt-get purge nginx <span># Removes everything.</span></code>
Copy after login

Uninstall nginx dependent programs that are no longer needed

<code><span>sudo</span> apt-get autoremove</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 use of apt method to install and uninstall nginx under ubuntu, 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