The nginx
package can be removed with the following command:
$ sudo yum erase nginx
If there is no need to make the web server software available, removing it provides a safeguard against its activation.
The nginx
service can be disabled with the following command:
$ sudo systemctl mask --now nginx.service
Running web server software provides a network-based avenue of attack, and should be disabled if not needed.