Install Nginx in RedHat and CentOS

Source: Internet
Author: User

Install Nginx in RedHat and CentOS

The most stable version on the official website is 1.6.1. This tutorial takes 1.6.1 as an example:

1. You can set the rpm source for RedHat and CentOS,

  • RHEL 5
  • RHEL 6
  • RHEL 7
  • CentOS 5
  • CentOS 6
  • CentOS 7

Download and install the above files

 

Run the command yum install nginx

You can configure the following sources for debian and Ubuntu:

Deb http://nginx.org/packages/debian/ codename nginx

The deb-src http://nginx.org/packages/debian/ codename nginx

Or

Deb http://nginx.org/packages/ubuntu/ codename nginx

The deb-src http://nginx.org/packages/ubuntu/ codename nginx

Run

Apt-get update

Apt-get install nginx

2. source code compilation

Http://nginx.org/en/download.html downloading nginx1.6.1

 

./configure    --sbin-path=/usr/local/nginx/nginx    --conf-path=/usr/local/nginx/nginx.conf    --pid-path=/usr/local/nginx/nginx.pid    --with-http_ssl_modulemakemake install

Dependencies may exist in the middle. You can install related dependencies as prompted.

 

More installation information reference http://nginx.org/en/docs/configure.html

-------------------------------------- Split line --------------------------------------

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Build a WEB server using Nginx

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Nginx installation and configuration instructions

Nginx log filtering using ngx_log_if does not record specific logs

-------------------------------------- Split line --------------------------------------

Nginx details: click here
Nginx: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.