Official Red Hat/CentOS packages
To add nginx yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:
CentOS:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
RHEL:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ gpgcheck=0 enabled=1
Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either "5" (for 5.x) or "6" (for 6.x), depending upon your OS version.
Official Debian/Ubuntu packages
Append the appropriate stanza to /etc/apt/sources.list. The Pgp page explains the signing of the nginx.org released packaging.
Ubuntu 10.04:
deb http://nginx.org/packages/ubuntu/ lucid nginx deb-src http://nginx.org/packages/ubuntu/ lucid nginx
Debian 6:
deb http://nginx.org/packages/debian/ squeeze nginx deb-src http://nginx.org/packages/debian/ squeeze nginx
Ubuntu PPA
This PPA is maintained by volunteers and is not distributed by nginx.org. It has some additional compiled-in modules and may be more fitting for your environment.
You can get the latest stable version of Nginx from the Nginx PPA on Launchpad: You will need to have root privileges to perform the following commands.
For Ubuntu 10.04 and newer:
sudo -s nginx=stable # use nginx=development for latest development version add-apt-repository ppa:nginx/$nginx apt-get update apt-get install nginx
If you get an error about add-apt-repository not existing, you will want to install python-software-properties. For other Debian/Ubuntu based distributions, you can try the lucid variant of the PPA which is the most likely to work on older package sets.
sudo -s nginx=stable # use nginx=development for latest development version echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu lucid main" > /etc/apt/sources.list.d/nginx-$nginx-lucid.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C apt-get update apt-get install nginx
Official Win32 Binaries
As of 0.8.50, Nginx is now available as an official Windows binary.
The Windows version is provided as a binary-only due to the current build process (which currently uses some Wine tools). When the build process has been cleaned up, source will be made available. Igor does not want to support build issues with the current system.
Installation:
cd c:\ unzip nginx-1.2.3.zip ren nginx-1.2.3 nginx cd nginx start nginx
Control:
nginx -s [ stop | quit | reopen | reload ]
For problems look in c:\nginx\logs\error.log or in EventLog.
In addition, Kevin Worthington maintains earlier Windows builds of the development branch.
Building Nginx From Source
After extracting the source, run these commands from a terminal:
./configure make sudo make install
By default, Nginx will be installed in /usr/local/nginx. You may change this and other options with the compile-time options.
You might also want to peruse the catalog of third-party modules, since these must be built at compile-time.
Command:nginx –h help
安装nginx之前需要zlib和pcre先用rpm查看是否安装。
备注centos系统下:
yum search 软件名
yum install 软件名
rpm –q 软件名
<!--StartFragment -->
相关推荐
本文档将详细介绍 Nginx 安装部署的步骤和配置,包括必要的工具包安装、Nginx 安装、插件安装、配置 Nginx.conf 文件等方面的知识点。 必要的工具包安装 在安装 Nginx 之前,需要安装一些必要的工具包。这些工具包...
Nginx 安装步骤详细 Nginx 是一个流行的开源 Web 服务器软件,广泛应用于 Web 服务器、反向代理、负载均衡、媒体流等领域。下面是 Nginx 安装步骤的详细介绍。 安装前的准备 在安装 Nginx 之前,需要确保编译环境...
### Nginx安装全流程 Nginx是一款高性能的HTTP服务器及反向代理服务软件,它在互联网领域扮演着至关重要的角色。本文将详细介绍Nginx的安装全流程,涵盖安装前的准备、安装步骤、配置流程以及如何实现开机自启动。 ...
### Nginx安装与后端健康检查模块配置详解 #### 一、Nginx环境搭建与核心组件安装 **1.1 基础环境准备** - **操作系统**: CentOS 6.5 - **基本服务器配置**: 在安装过程中选择了“基本服务器”配置。 **1.2 安装...
6. **编译和安装Nginx**:使用`make`命令编译源代码,然后运行`make install`将Nginx安装到系统中。 7. **配置Nginx服务器**:在`nginx.conf`文件中,需要配置RTMP部分以接收和处理RTMP流。这通常涉及到定义一个...
这里我们讨论的是一个包含Nginx安装文件、PHP安装文件、补丁和源码的压缩包,这将帮助我们快速搭建一个支持动态内容的Web服务器。 首先,让我们深入了解Nginx。Nginx是一款高性能的HTTP和反向代理服务器,以其高效...
### Nginx安装成Windows服务方法详解 在Web服务器领域,Nginx因其高效、稳定以及灵活的配置能力而备受青睐。然而,在Windows操作系统上,将Nginx配置为系统服务,以便于管理和自动化运行,是一项重要的技能。本文将...
3. **创建目标目录并配置**: 创建自定义的Nginx安装目录,例如`/usr/mydir/nginx`,然后使用`configure`脚本来指定安装位置。这一步非常重要,因为默认会安装到`/usr/local/nginx`: ```bash mkdir -p /usr/mydir/...
### CentOS 下 Nginx 安装操作文档 #### 概述 本文档旨在提供一份详细的指导,帮助用户在 CentOS 系统中成功安装 Nginx 1.11.4 版本及其所需依赖包。Nginx 是一款高性能的 HTTP 和反向代理 Web 服务器,同时也是一...
**Nginx安装配置** Nginx是一款高性能的Web服务器,常用于反向代理、负载均衡和HTTP缓存。它的轻量级特性、高效的并发处理能力以及稳定的性能使其在IT行业中备受青睐。本文将详细讲解Nginx的安装配置过程,并结合...
**Nginx安装配置详解** Nginx是一款高性能的HTTP和反向代理服务器,广泛用于网站的负载均衡和内容分发。本指南将详细介绍如何在Windows环境下安装和配置Nginx,以及设置负载均衡。 ### 一、Nginx安装 1. **解压...
3. **配置**:进入解压后的目录,并配置Nginx安装。根据你的需求,可以指定安装路径、模块选择等。基本配置如下: ``` cd nginx-1.18.0 ./configure --prefix=/usr/local/nginx --with-...
【Nginx安装文档】 Nginx是一款高性能的HTTP和反向代理服务器,以其轻量级、稳定性和高并发处理能力而闻名。本文档将详细阐述如何从零开始安装Nginx,帮助初学者轻松掌握这一强大的Web服务器。 1. **系统需求与...
(1) Nginx安装配置 - 1 - 1) Nginx安装 - 1 - 2) Nginx配置 - 1 - a)对c:\nginx\conf\nginx.conf文件进行配置: - 1 - b)常用的 Nginx 参数 - 3 - c)静态文件处理 - 4 - d)动态页面请求处理 - 4 - e)下面为nginx....
nginx安装、配置、负载均衡
**Nginx安装详解** Nginx是一款高性能的Web服务器,同时也是一款反向代理、负载均衡服务器。它的轻量级特性、高效的并发处理能力和低内存消耗使得它在现代Web服务中占据重要地位。本教程将详细讲解如何在不同的操作...
【Nginx安装手册】 Nginx是一款高性能的HTTP和反向代理服务器,以其轻量级、高并发处理能力而闻名。本安装手册主要针对在Linux环境下,特别是CentOS 6.5系统上的Nginx安装流程进行详细阐述。 ### 1. 安装依赖 在...
**Nginx安装和部署详解** Nginx是一款高性能、轻量级的Web服务器和反向代理服务器,常用于网站的静态资源服务和负载均衡。本文将详细介绍如何在Linux系统中安装Nginx,以及相关的配置和部署步骤。 **一、安装Nginx...