Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Nginx's official Yum source for CentOS

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "CentOS how to configure Nginx official Yum source", so the editor summarizes the following contents, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "CentOS how to configure Nginx official Yum source" article.

Since we don't have the nginx we want in the yum source, we need to create a "/ etc/yum.repos.d/nginx.repo" file, which is actually a new yum source.

[root@localhost ~] # vim / etc/yum.repos.d/nginx.repo

Then copy the following:

[nginx] name=nginx repobaseurl= http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1

Then after saving the "/ etc/yum.repos.d/nginx.repo" file, we use the yum command to check whether our nginx's yum source is configured.

[root@localhost ~] # yum list | grep nginxnginx.x86_64 1 1.el7_4.ngx nginxnginx-debug.x86_64 1.12.2-1.el7.ngx nginxnginx-debuginfo.x86_64 1v 1.12.2-1.el7_4.ngx nginxnginx-module-geoip.x86_64 1v 1.12.2-1.el7_4 .ngx nginxnginx-module-geoip-debuginfo.x86_64 1v 1.12.2-1.el7_4.ngx nginxnginx-module-image-filter.x86_64 1v 1.12.2-1.el7_4.ngx nginxnginx-module-image-filter-debuginfo.x86_64 1v 1.12.2-1.el7_4.ngx nginxnginx-module-njs.x86_64 1v 1.12.2.0.1.14-1.el7 _ 4.ngx nginxnginx-module-njs-debuginfo.x86_64 1VR 1.12.2.0.1.14-1.el7_4.ngx nginxnginx-module-perl.x86_64 1V 1.12.2-1.el7_4.ngx nginxnginx-module-perl-debuginfo.x86_64 1V 1.12.2-1.el7_4.ngx nginxnginx-module-xslt.x86_64 1V 1.12.2-1.el7 _ 4.ngx nginxnginx-module-xslt-debuginfo.x86_64 112.el7.ngx nginxpcp-pmda-nginx.x86_64 1.12.2-1.el7_4.ngx nginxnginx-nr-agent.noarch 2.0.0-12.el7.ngx nginxpcp-pmda-nginx.x86_64 3.11.8-7.el7 base

If the command is displayed like this, then the yum source for our nginx is configured successfully!

Then to install our nginx, execute it directly:

[root@localhost ~] # yum-y install nginx

If the operation is correct, the nginx environment has already installed ok.

Of course, you can also use the command to find out if the installation is complete.

[root@localhost ~] # rpm-q nginxnginx version: nginx/1.12.2

No, it has been successful, and it is the latest official version of nginx.

The above is the content of this article on "how to configure Nginx's official Yum source for CentOS". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report