How To Install nginx-common on Debian 9
Introduction
In this tutorial we learn how to install nginx-common
on Debian 9.
What is nginx-common
nginx-common is:
Nginx (“engine X”) is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers.
This package contains base configuration files used by all versions of nginx.
There are three methods to install nginx-common
on Debian 9. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install nginx-common Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install nginx-common
using apt-get
by running the following command:
sudo apt-get -y install nginx-common
Install nginx-common Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install nginx-common
using apt
by running the following command:
sudo apt -y install nginx-common
Install nginx-common Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install nginx-common
using aptitude
by running the following command:
sudo aptitude -y install nginx-common
How To Uninstall nginx-common on Debian 9
To uninstall only the nginx-common
package we can use the following command:
sudo apt-get remove nginx-common
Uninstall nginx-common And Its Dependencies
To uninstall nginx-common
and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove nginx-common
Remove nginx-common Configurations and Data
To remove nginx-common
configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge nginx-common
Remove nginx-common configuration, data, and all of its dependencies
We can use the following command to remove nginx-common
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge nginx-common
Dependencies
nginx-common have the following dependencies:
References
Summary
In this tutorial we learn how to install nginx-common
package on Debian 9 using different package management tools: apt
, apt-get
and aptitude
.