少于1分钟
https://nginx.org/en/docs/install.html
nginx can be installed differently, depending on the operating system.
nginx 的安装方式因操作系统而异。
For Linux, nginx packages from nginx.org can be used.
对于 Linux,可以使用 nginx.org 上的 软件包 进行安装。
On FreeBSD, nginx can be installed either from the packages or through the ports system. The ports system provides greater flexibility, allowing selection among a wide range of options. The port will compile nginx with the specified options and install it.
在 FreeBSD 上,可以通过 软件包 或 ports 系统安装 nginx。ports 系统提供了更大的灵活性,允许在广泛的选项中进行选择。该端口将使用指定的选项编译 nginx 并安装它。
If some special functionality is required, not available with packages and ports, nginx can also be compiled from source files. While more flexible, this approach may be complex for a beginner. For more information, see Building nginx from Sources.
如果需要一些在软件包和 ports 中不可用的特殊功能,还可以从源代码编译 nginx。虽然更加灵活,但对于初学者来说,这种方法可能会更加复杂。有关更多信息,请参阅 从源代码构建 nginx。