skip to Main Content

I googled it and tried lots of solutions, but this problem still happened.

This is my yum.conf:

[root@localhost etc]# cat yum.conf 
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True

I tried to re-install epel-release:

[root@localhost ~]# dnf update
Last metadata expiration check: 0:01:38 ago on Sat 09 May 2020 01:30:20 AM EDT.
Dependencies resolved.
Nothing to do.
Complete!
[root@localhost ~]# dnf install httpd
Last metadata expiration check: 0:01:45 ago on Sat 09 May 2020 01:30:20 AM EDT.
No match for argument: httpd
Error: Unable to find a match: httpd
[root@localhost ~]# dnf provides httpd
Last metadata expiration check: 0:01:56 ago on Sat 09 May 2020 01:30:20 AM EDT.
Error: No Matches found
[root@localhost ~]# dnf install epel-release
Last metadata expiration check: 0:02:31 ago on Sat 09 May 2020 01:30:20 AM EDT.
Package epel-release-8-8.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Re-enabled modules:

[root@localhost ~]# dnf search httpd
Last metadata expiration check: 0:02:45 ago on Sat 09 May 2020 01:30:20 AM EDT.
====================================================================== Name & Summary Matched: httpd =======================================================================
libmicrohttpd-doc.noarch : Documentation for libmicrohttpd
libmicrohttpd-devel.i686 : Development files for libmicrohttpd
libmicrohttpd-devel.x86_64 : Development files for libmicrohttpd
lighttpd-filesystem.noarch : The basic directory layout for lighttpd
centos-logos-httpd.noarch : CentOS-related icons and pictures used by httpd
lighttpd-mod_authn_pam.x86_64 : Authentication module for lighttpd that uses PAM
lighttpd-mod_authn_gssapi.x86_64 : Authentication module for lighttpd that uses GSSAPI
keycloak-httpd-client-install.noarch : Tools to configure Apache HTTPD as Keycloak client
lighttpd-mod_mysql_vhost.x86_64 : Virtual host module for lighttpd that uses a MySQL database
lighttpd-fastcgi.x86_64 : FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-mod_authn_mysql.x86_64 : Authentication module for lighttpd that uses a MySQL database
python3-keycloak-httpd-client-install.noarch : Tools to configure Apache HTTPD as Keycloak client
=========================================================================== Name Matched: httpd ============================================================================
lighttpd.x86_64 : Lightning fast webserver with light system requirements
httpd-devel.x86_64 : Development interfaces for the Apache HTTP server
httpd-tools.x86_64 : Tools for use with the Apache HTTP Server
httpd-manual.noarch : Documentation for the Apache HTTP server
libmicrohttpd.i686 : Lightweight library for embedding a webserver in applications
libmicrohttpd.x86_64 : Lightweight library for embedding a webserver in applications
sysusage-httpd.noarch : Apache configuration for sysusage
httpd-filesystem.noarch : The basic directory layout for the Apache HTTP server
httpd-filesystem.noarch : The basic directory layout for the Apache HTTP server
========================================================================== Summary Matched: httpd ==========================================================================
mod_dav_svn.x86_64 : Apache httpd module for Subversion server
mod_auth_mellon.x86_64 : A SAML 2.0 authentication module for the Apache Httpd Server
[root@localhost ~]# dnf module list --enabled
Last metadata expiration check: 0:03:42 ago on Sat 09 May 2020 01:30:20 AM EDT.
CentOS-8 - AppStream
Name                                 Stream                        Profiles                                        Summary                                                  
go-toolset                           rhel8 [d][e]                  common [d]                                      Go                                                       
httpd                                2.4 [d][e]                    common [d], devel, minimal                      Apache HTTP Server                                       
mariadb                              10.3 [d][e]                   client, server [d], galera                      MariaDB Module                                           
mysql                                8.0 [d][e]                    client, server [d]                              MySQL Module                                             
perl-DBD-MySQL                       4.046 [d][e]                  common [d]                                      A MySQL interface for Perl                               
perl-DBI                             1.641 [d][e]                  common [d]                                      A database access API for Perl                           
python27                             2.7 [d][e]                    common [d]                                      Python programming language, version 2.7                 
python36                             3.6 [d][e]                    common [d], build                               Python programming language, version 3.6                 
satellite-5-client                   1.0 [d][e]                    common [d], gui                                 Red Hat Satellite 5 client packages                      

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                                 Stream                        Profiles                                        Summary                                                  
php                                  remi-7.4 [e]                  common [d] [i], devel, minimal                  PHP scripting language                                   

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@localhost ~]# dnf module disable httpd
Last metadata expiration check: 0:04:00 ago on Sat 09 May 2020 01:30:20 AM EDT.
Dependencies resolved.
============================================================================================================================================================================
 Package                                  Architecture                            Version                                    Repository                                Size
============================================================================================================================================================================
Disabling modules:
 httpd                                                                                                                                                                     

Transaction Summary
============================================================================================================================================================================

Is this ok [y/N]: y
Complete!
[root@localhost ~]# dnf module enable httpd:2.4/common
Last metadata expiration check: 0:04:19 ago on Sat 09 May 2020 01:30:20 AM EDT.
Ignoring unnecessary profile: 'httpd/common'
Dependencies resolved.
============================================================================================================================================================================
 Package                                  Architecture                            Version                                    Repository                                Size
============================================================================================================================================================================
Enabling module streams:
 httpd                                                                            2.4                                                                                      

Transaction Summary
============================================================================================================================================================================

Is this ok [y/N]: y
Complete!
[root@localhost ~]# dnf module list
CentOS-8 - AppStream                                                                                                                        3.6 kB/s | 4.3 kB     00:01    
CentOS-8 - Base                                                                                                                             6.0 kB/s | 3.9 kB     00:00    
CentOS-8 - Extras                                                                                                                           441  B/s | 1.5 kB     00:03    
CentOS-8 - PowerTools                                                                                                                       1.9 kB/s | 4.3 kB     00:02    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                      9.5 kB/s | 9.4 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                                                                              6.1 kB/s | 9.0 kB     00:01    
Node.js Packages for Enterprise Linux 8 - x86_64                                                                                            9.6 kB/s | 2.5 kB     00:00    
Remi's Modular repository for Enterprise Linux 8 - x86_64                                                                                   417  B/s | 3.5 kB     00:08    
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                  2.5 kB/s | 3.0 kB     00:01    
CentOS-8 - AppStream
Name                      Stream               Profiles                                     Summary                                                                         
389-ds                    1.4                                                               389 Directory Server (base)                                                     
ant                       1.10 [d]             common [d]                                   Java build tool                                                                 
container-tools           rhel8 [d]            common [d]                                   Common tools and dependencies for container runtimes                            
container-tools           1.0                  common [d]                                   Common tools and dependencies for container runtimes                            
freeradius                3.0 [d]              server [d]                                   High-performance and highly configurable free RADIUS server                     
gimp                      2.8 [d]              common [d], devel                            gimp module                                                                     
go-toolset                rhel8 [d][e]         common [d]                                   Go                                                                              
httpd                     2.4 [d][e]           common [d], devel, minimal                   Apache HTTP Server                                                              
idm                       DL1                  common [d], adtrust, client, dns, server     The Red Hat Enterprise Linux Identity Management system module                  
idm                       client [d]           common [d]                                   RHEL IdM long term support client module                                        
inkscape                  0.92.3 [d]           common [d]                                   Vector-based drawing program using SVG                                          
javapackages-runtime      201801 [d]           common [d]                                   Basic runtime utilities to support Java applications                            
jmc                       rhel8                common, core                                 Java Mission Control is a profiling and diagnostics tool for the Hotspot JVM    
libselinux-python         2.8                  common                                       Python 2 bindings for libselinux                                                
llvm-toolset              rhel8 [d]            common [d]                                   LLVM                                                                            
mailman                   2.1 [d]              common [d]                                   Electronic mail discussion and e-newsletter lists managing software             
mariadb                   10.3 [d][e]          client, server [d], galera                   MariaDB Module                                                                  
maven                     3.5 [d]              common [d]                                   Java project management and project comprehension tool                          
mercurial                 4.8 [d]              common [d]                                   Mercurial -- a distributed SCM                                                  
mod_auth_openidc          2.3                                                               Apache module suporting OpenID Connect authentication                           
mysql                     8.0 [d][e]           client, server [d]                           MySQL Module                                                                    
nginx                     1.14 [d]             common [d]                                   nginx webserver                                                                 
nginx                     1.16                 common                                       nginx webserver                                                                 
nodejs                    10 [d][x]            common [d], development, minimal, s2i        Javascript runtime                                                              
nodejs                    12 [x]               common, development, minimal, s2i            Javascript runtime                                                              
parfait                   0.5                  common                                       Parfait Module                                                                  
perl                      5.24                 common [d], minimal                          Practical Extraction and Report Language                                        
perl                      5.26 [d]             common [d], minimal                          Practical Extraction and Report Language                                        
perl-App-cpanminus        1.7044 [d]           common [d]                                   Get, unpack, build and install CPAN modules                                     
perl-DBD-MySQL            4.046 [d][e]         common [d]                                   A MySQL interface for Perl                                                      
perl-DBD-Pg               3.7 [d]              common [d]                                   A PostgreSQL interface for Perl                                                 
perl-DBD-SQLite           1.58 [d]             common [d]                                   SQLite DBI driver                                                               
perl-DBI                  1.641 [d][e]         common [d]                                   A database access API for Perl                                                  
perl-FCGI                 0.78 [d]             common [d]                                   FastCGI Perl bindings                                                           
perl-YAML                 1.24 [d]             common [d]                                   Perl parser for YAML                                                            
php                       7.2 [d]              common [d], devel, minimal                   PHP scripting language                                                          
php                       7.3                  common, devel, minimal                       PHP scripting language                                                          
pki-core                  10.6                                                              PKI Core module for PKI 10.6 or later                                           
pki-deps                  10.6                                                              PKI Dependencies module for PKI 10.6 or later                                   
postgresql                9.6                  client, server [d]                           PostgreSQL server and client module                                             
postgresql                10 [d]               client, server [d]                           PostgreSQL server and client module                                             
postgresql                12                   client, server                               PostgreSQL server and client module                                             
python27                  2.7 [d][e]           common [d]                                   Python programming language, version 2.7                                        
python36                  3.6 [d][e]           common [d], build                            Python programming language, version 3.6                                        
redis                     5 [d]                common [d]                                   Redis persistent key-value database                                             
rhn-tools                 1.0 [d]              common [d]                                   Red Hat Satellite 5 tools for RHEL                                              
ruby                      2.5 [d]              common [d]                                   An interpreter of object-oriented scripting language                            
ruby                      2.6                  common                                       An interpreter of object-oriented scripting language                            
rust-toolset              rhel8 [d]            common [d]                                   Rust                                                                            
satellite-5-client        1.0 [d][e]           common [d], gui                              Red Hat Satellite 5 client packages                                             
scala                     2.10 [d]             common [d]                                   A hybrid functional/object-oriented language for the JVM                        
squid                     4 [d]                common [d]                                   Squid - Optimising Web Delivery                                                 
subversion                1.10 [d]             common [d], server                           Apache Subversion                                                               
swig                      3.0 [d]              common [d], complete                         Connects C/C++/Objective C to some high-level programming languages             
varnish                   6 [d]                common [d]                                   Varnish HTTP cache                                                              
virt                      rhel [d]             common [d]                                   Virtualization module                                                           

CentOS-8 - PowerTools
Name                      Stream               Profiles                                     Summary                                                                         
javapackages-tools        201801               common                                       Tools and macros for Java packaging support                                     
mariadb-devel             10.3                                                              MariaDB Module                                                                  
virt-devel                rhel                                                              Virtualization module                                                           

Extra Packages for Enterprise Linux Modular 8 - x86_64
Name                      Stream               Profiles                                     Summary                                                                         
389-directory-server      stable               minimal, legacy, default [d]                 389 Directory Server                                                            
389-directory-server      testing              minimal, legacy, default [d]                 389 Directory Server                                                            
avocado                   latest               minimal, default                             Framework with tools and libraries for Automated Testing                        
cobbler                   3                    default [d]                                  Versatile Linux deployment server                                               
libuv                     epel8-buildroot      devel [d]                                    libuv-devel for EPEL 8                                                          
nginx                     mainline             common                                       nginx webserver                                                                 
nodejs                    12 [x]               development, minimal, default                Javascript runtime                                                              
nodejs                    13 [x]               development, minimal, default                Javascript runtime                                                              

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                      Stream               Profiles                                     Summary                                                                         
glpi                      9.3                  common [d]                                   Free IT asset management software                                               
glpi                      9.4 [d]              common [d]                                   Free IT asset management software                                               
php                       remi-7.2             common [d], devel, minimal                   PHP scripting language                                                          
php                       remi-7.3             common [d], devel, minimal                   PHP scripting language                                                          
php                       remi-7.4 [e]         common [d] [i], devel, minimal               PHP scripting language                                                          
redis                     remi-5.0             common [d]                                   Redis persistent key-value database                                             
redis                     remi-6.0             common [d]                                   Redis persistent key-value database                                             

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@localhost ~]# dnf install @httpd:2.4/common
Last metadata expiration check: 0:04:35 ago on Sat 09 May 2020 01:30:20 AM EDT.
Unable to resolve argument httpd:2.4/common
No match for package httpd
Error: Unable to find a match

Same problem to community repo:

[root@localhost ~]# vim /etc/yum.repos.d/nginx.repo
[root@localhost ~]# cat /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[root@localhost ~]# yum-config-manager --enable nginx-mainline
[root@localhost ~]# yum install nginx
CentOS-8 - AppStream                                                                                        7.7 kB/s | 4.3 kB     00:00
CentOS-8 - Base                                                                                             4.6 kB/s | 3.9 kB     00:00
CentOS-8 - Extras                                                                                           1.6 kB/s | 1.5 kB     00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                      2.7 kB/s | 8.7 kB     00:03
Extra Packages for Enterprise Linux 8 - x86_64                                                               17 kB/s | 7.4 kB     00:00
nginx stable repo                                                                                                                           485  B/s |  15 kB     00:31    
nginx mainline repo                                                                                                                         4.8 kB/s |  38 kB     00:07    
No match for argument: nginx
Error: Unable to find a match: nginx

There are some my repo configuration files:

[root@localhost yum.repos.d]# ls
CentOS-AppStream.repo   CentOS-Debuginfo.repo  CentOS-HA.repo          CentOS-Vault.repo     epel-testing-modular.repo  remi.repo
CentOS-Base.repo        CentOS-Devel.repo      CentOS-Media.repo       epel-modular.repo     epel-testing.repo          remi-safe.repo
CentOS-centosplus.repo  CentOS-Extras.repo     CentOS-PowerTools.repo  epel-playground.repo  nodesource-el8.repo
CentOS-CR.repo          CentOS-fasttrack.repo  CentOS-Sources.repo     epel.repo             remi-modular.repo
[root@localhost yum.repos.d]# cat CentOS-AppStream.repo 
# CentOS-AppStream.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[AppStream]
name=CentOS-$releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[root@localhost yum.repos.d]# cat CentOS-Base.repo 
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[BaseOS]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details. Some details.

2

Answers


  1. I hope it helps you.

    I am trying to install Nginx using Yum.

    Instructions for installing Nginx can be found in the Download section of the NGINX official website.

    sudo vi /etc/yum.repos.d/nginx.repo
    
    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
    gpgcheck=0
    enabled=1
    

    In the middle, you need to change the ‘OS’ and ‘OSRELEASE’ items to suit your OS.
    I am installing in CentOS 7.0, so I set it as below.

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/centos/7/$basearch/
    gpgcheck=0
    enabled=1
    

    Next step

    sudo yum install -y nginx
    

    Open the web server port in the firewall.

    sudo firewall-cmd --permanent --zone=public --add-service=http
    sudo firewall-cmd --permanent --zone=public --add-service=https
    sudo firewall-cmd --reload
    

    Run Nginx and change it to start automatically at boot time.

    systemctl start nginx
    systemctl enable nginx
    

    Source: http://blog.tjsrms.me/centos-7-nginx-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0/

    Login or Signup to reply.
  2. You can find the below information useful to install the Nginx web server. But, Nginx is not available in CentOS 8 default repository. So, follow the below steps. And please let me know if it works for you or not.

    Step 1: Installation of EPEL repository

    You have to install the EPEL (Extra Package for Enterprise Linux) repository on your server. It is a free repository and allows you to connect many other open-source software packages. Use the below command to install EPEL.

    sudo dnf install epel-release
    

    Press y to accept the installation confirmation and press the Enter key.

    After completing the EPEL installation, run the below command to view the available Nginx versions.

    dnf module list nginx
    

    Step 2: Enabling the latest Nginx web server module

    After that, you have to enable the latest Nginx module. In other words, you have to tell the dnf command to install the newest version. So, use the below command for this purpose.

    For instance, The available version of Nginx right now is in EPEL repository 1.8.

    sudo dnf module enable nginx:1.18
    

    Step 3: Install Nginx web server

    So, we have already installed the EPEL repository. As a result, we can install it directly using dnf command. Use the below command to install the latest version of Nginx.

    sudo dnf -y install nginx
    

    Step 4: Starting and enabling the Nginx service daemon

    Use the below command, which will start the service immediately, and also it will enable the service on boot.

    sudo systemctl enable --now nginx
    

    Step 5: Checking the Nginx service status

    sudo systemctl status nginx
    

    Step 6: Configuration of the firewall to allow the Nginx traffic

    You can run the below command to add HTTP and https service permanently in the firewall.

    sudo firewall-cmd --permanent --add-service http
    
    sudo firewall-cmd --permanent --add-service https
    

    After allowing the service, we need to reload the firewall service daemon.

    sudo firewall-cmd --reload
    

    Step 7: Checking the Nginx web server

    Now, you can test your Nginx web server that if it is up and running or not by accessing the public IP of your server or domain name from your web browser.

    http://domain_name_or_IP

    For Instance, if the IP address of the server is 192.168.43.164. So, the link will look like http://192.168.43.164

    That’s it about NGINX web server installation.

    But, if you like to get a few extra details, then You can find a complete example on my blog:

    How to install Nginx web server on CentOS 8

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search