Linux Nginx安装与卸载
一.安装
1、添加Nginx存储库
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装Nginx,我使用的是Yum安装
sudo yum install -y nginx
3.启动nginx
systemctl start nginx.service
页面访问如果出现这个说明安装成功
关闭nginx
nginx -s quit
二.卸载
1.停止Nginx软件
nginx -s quit
2.从源头删除Nginx
rm -rf /usr/sbin/nginx
rm -rf /etc/nginx
rm -rf /etc/init.d/nginx
3.再使用yum清理
yum remove nginx