- Nginx 软件包在默认的 Ubuntu 存储库中可用。 安装非常简单。首先更新包列表,然后安装 Nginx。
sudo apt update sudo apt install nginx 或 sudo apt install -y nginx
- 查看nginx版本与启动状态
nginx -v whereis nginx #查找安装在哪里 service nginx status 或 systemctl status nginx
sudo apt update sudo apt install nginx 或 sudo apt install -y nginx
nginx -v whereis nginx #查找安装在哪里 service nginx status 或 systemctl status nginx