Ubuntu
sudo apt-get update
sudo apt-get install nginx
CentOS and Amazon Linux
sudo yum install nginx
Fedora
sudo dnf install nginx
验证安装是否成功
http://server_domain_name_or_IP
启动服务
sudo service nginx start
停止服务
sudo service nginx stop
重启服务
sudo service nginx restart
网友评论