How to solve the problem of No package nginx available when installing nginx in centos yum

Source: Internet
Author: User
Tags centos

Cause:

 

Nginx is located in the third-party yum source, not in the centos official yum source.

 

Solution:

 

Install epel (Extra Packages for Enterprise Linux)

A. Go to epel website http://fedoraproject.org/wiki/epelto download

B. My system is centos5.7, cpu is x86_64, so I downloaded wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

For centos6, you should download the wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

C. Install epel

 

Rpm-ivh epel-release-5-4.noarch.rpm

If you execute yum install nginx again, the system prompts that the installation is successful.

Note:

 

Epel installation is related to centos system version and cpu hardware architecture,

View the system version (lsb-release-),

View cpu hardware architecture (arch)

 

Epel is a RHEL Ora software repository that provides high-quality software packages for RHEL and its derivative releases, such as CentOS and Scientific Linux. With EPEL installed, you can install the software through yum install package-name, just like on Fedora.

Related Article

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.