Use the yum source on the official nginx website to install nginx

Source: Internet
Author: User

The first method is simple, that is, to use the official nginx Yum source. We use Cat to view the nginx. Repo file. The command is as follows:

CAT/etc/yum. Repos. d/nginx. Repo

The content of the nginx. Repo file is as follows:

[Nginx] Name = nginx repobaseurl = http://nginx.org/packages/centos/?releasever/?basearch/gpgcheck=0enabled=1

The second method is to use createrepo to build your own Yum source. This method is even better. We can download the suitable RPM package on the official nginx website and add it to our Yum source, in a custom environment with strict requirements for automated O & M, most O & M personnel choose this method.


After installing nginx in this way, you will find that it is much easier to install nginx than the source code. For example, if nginx is automatically allocated to the user who runs nginx: nginx, nginx logs are automatically stored in/var/log/nginx, and the working directory is/etc/nginx.


This article from the "fuqin liquor" blog, please be sure to keep this source http://yuhongchun.blog.51cto.com/1604432/1565222

Use the yum source on the official nginx website to install nginx

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.