Install nginx and yumnginx in yum

Source: Internet
Author: User

Install nginx and yumnginx in yum

1. Download an rpm package

Wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

2. Install this rpm package

Rpm-ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm

3. Start nginx Installation

Yum install nginx


How to install nginx in centos

Install the pcre Library before installing nginx
1. yum install pcre-devel.i686

2. Create a www group and a www user, and add the www user to the www user group.
Groupadd www
Useradd-g www

3. tar-zxvf nginx-0.8.55.tar.gz

4. cd nginx-0.8.55

Install nginx in the/usr/local/directory
5 ../configure -- prefix =/usr/local/nginx -- conf-path =/usr/local/nginx/conf/nginx. conf -- user = www -- group = www

6. make

7. make install
OK.

How to add a module after centos uses yum to install nginx

It seems that only compilation and installation are supported.
If not,
There is another way: Find another machine, operating system, including the path, which is the same as the machine where you want to add modules. Compile and install Nginx, after the installation, copy sbin/nginx to overwrite nginx on the machine where the module is added (find the path for yourself ). This poses a certain risk.
 

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.