#安装
apt-get update
apt-get install nginx
#启动
sudo /etc/init.d/nginx start
补充:
Usage: nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}
#卸载
sudo apt-get remove nginx nginx-common # Removes all but config files.
sudo apt-get purge nginx nginx-common # Removes everything.
sudo apt-get autoremove # After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.