软件安装与卸载(YUM)

[root@localhost ~]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@localhost ~]# mount | grep sr0
/dev/sr0 on /run/media/root/RHEL-8-5-0-BaseOS-x86_64 type iso9660 (ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=0,gid=0,dmode=500,fmode=400,uhelper=udisks2)
/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=0,gid=0,dmode=500,fmode=400)
[root@localhost ~]# vim /etc/yum.repos.d/base.repo
[BaseOS]
name=RHEL8-BaseOS
baseurl=file:///mut/BaseOS
gpgcheck=0
[AppStream]
name=RHEL8-AppStream
baseurl=file:///mut/AppStream
gpgcheck=0

[root@localhost ~]# dnf install httpd
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

RHEL8-BaseOS                                     80 MB/s | 2.4 MB     00:00    
RHEL8-AppStream                                  65 MB/s | 7.2 MB     00:00    
Dependencies resolved.
================================================================================
 Package         Arch   Version                                 Repo       Size
================================================================================
Installing:
 httpd           x86_64 2.4.37-41.module+el8.5.0+11772+c8e0c271 AppStream 1.4 M
Installing dependencies:
 apr             x86_64 1.6.3-12.el8                            AppStream 130 k
 apr-util        x86_64 1.6.1-6.el8                             AppStream 105 k
 httpd-filesystem
                 noarch 2.4.37-41.module+el8.5.0+11772+c8e0c271 AppStream  39 k
 httpd-tools     x86_64 2.4.37-41.module+el8.5.0+11772+c8e0c271 AppStream 106 k
 mod_http2       x86_64 1.15.7-3.module+el8.4.0+8625+d397f3da   AppStream 154 k
 redhat-logos-httpd
                 noarch 84.5-1.el8                              BaseOS     29 k
Installing weak dependencies:
 apr-util-bdb    x86_64 1.6.1-6.el8                             AppStream  25 k
 apr-util-openssl
                 x86_64 1.6.1-6.el8                             AppStream  27 k
Enabling module streams:
 httpd                  2.4                                                    

Transaction Summary
================================================================================
Install  9 Packages

Total size: 2.0 M
Installed size: 5.4 M
Is this ok [y/N]: 
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : apr-1.6.3-12.el8.x86_64                                1/9 
  Running scriptlet: apr-1.6.3-12.el8.x86_64                                1/9 
  Installing       : apr-util-bdb-1.6.1-6.el8.x86_64                        2/9 
  Installing       : apr-util-openssl-1.6.1-6.el8.x86_64                    3/9 
  Installing       : apr-util-1.6.1-6.el8.x86_64                            4/9 
  Running scriptlet: apr-util-1.6.1-6.el8.x86_64                            4/9 
  Installing       : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.   5/9 
  Running scriptlet: httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   6/9 
  Installing       : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   6/9 
  Installing       : redhat-logos-httpd-84.5-1.el8.noarch                   7/9 
  Installing       : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_   8/9 
  Installing       : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   9/9 
  Running scriptlet: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   9/9 
  Verifying        : redhat-logos-httpd-84.5-1.el8.noarch                   1/9 
  Verifying        : apr-1.6.3-12.el8.x86_64                                2/9 
  Verifying        : apr-util-1.6.1-6.el8.x86_64                            3/9 
  Verifying        : apr-util-bdb-1.6.1-6.el8.x86_64                        4/9 
  Verifying        : apr-util-openssl-1.6.1-6.el8.x86_64                    5/9 
  Verifying        : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   6/9 
  Verifying        : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   7/9 
  Verifying        : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.   8/9 
  Verifying        : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_   9/9 
Installed products updated.

Installed:
  apr-1.6.3-12.el8.x86_64                                                       
  apr-util-1.6.1-6.el8.x86_64                                                   
  apr-util-bdb-1.6.1-6.el8.x86_64                                               
  apr-util-openssl-1.6.1-6.el8.x86_64                                           
  httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                          
  httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch               
  httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                    
  mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                        
  redhat-logos-httpd-84.5-1.el8.noarch                                          

Complete!
[root@localhost ~]# touch index.html  /var/www/html
[root@localhost ~]# vim index.html
[root@localhost ~]# systemctl  start httpd

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-hte00qiV-1670491556223)(C:\Users\LENOVO\AppData\Roaming\Typora\typora-user-images\image-20221208172414620.png)]

[root@localhost ~]# dnf remove httpd
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Dependencies resolved.
================================================================================

 Package        Arch   Version                                 Repository  Size
================================================================================

Removing:
 httpd          x86_64 2.4.37-41.module+el8.5.0+11772+c8e0c271 @AppStream 4.3 M
Removing unused dependencies:
 apr            x86_64 1.6.3-12.el8                            @AppStream 272 k
 apr-util       x86_64 1.6.1-6.el8                             @AppStream 230 k
 apr-util-bdb   x86_64 1.6.1-6.el8                             @AppStream  12 k
 apr-util-openssl
                x86_64 1.6.1-6.el8                             @AppStream  20 k
 httpd-filesystem
                noarch 2.4.37-41.module+el8.5.0+11772+c8e0c271 @AppStream 400  
 httpd-tools    x86_64 2.4.37-41.module+el8.5.0+11772+c8e0c271 @AppStream 194 k
 mod_http2      x86_64 1.15.7-3.module+el8.4.0+8625+d397f3da   @AppStream 394 k
 redhat-logos-httpd
                noarch 84.5-1.el8                              @BaseOS    8.2 k

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

Remove  9 Packages

Freed space: 5.4 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   1/1 
  Running scriptlet: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   1/9 
  Erasing          : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   1/9 
  Running scriptlet: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   1/9 
  Erasing          : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   2/9 
  Running scriptlet: httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   2/9 
  Erasing          : redhat-logos-httpd-84.5-1.el8.noarch                   3/9 
  Erasing          : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.   4/9 
  Erasing          : apr-util-1.6.1-6.el8.x86_64                            5/9 
  Running scriptlet: apr-util-1.6.1-6.el8.x86_64                            5/9 
  Erasing          : apr-1.6.3-12.el8.x86_64                                6/9 
  Running scriptlet: apr-1.6.3-12.el8.x86_64                                6/9 
  Erasing          : apr-util-bdb-1.6.1-6.el8.x86_64                        7/9 
  Erasing          : apr-util-openssl-1.6.1-6.el8.x86_64                    8/9 
  Erasing          : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_   9/9 
  Running scriptlet: mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_   9/9 
  Verifying        : apr-1.6.3-12.el8.x86_64                                1/9 
  Verifying        : apr-util-1.6.1-6.el8.x86_64                            2/9 
  Verifying        : apr-util-bdb-1.6.1-6.el8.x86_64                        3/9 
  Verifying        : apr-util-openssl-1.6.1-6.el8.x86_64                    4/9 
  Verifying        : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64   5/9 
  Verifying        : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0   6/9 
  Verifying        : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.   7/9 
  Verifying        : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_   8/9 
  Verifying        : redhat-logos-httpd-84.5-1.el8.noarch                   9/9 
Installed products updated.

Removed:
  apr-1.6.3-12.el8.x86_64                                                       
  apr-util-1.6.1-6.el8.x86_64                                                   
  apr-util-bdb-1.6.1-6.el8.x86_64                                               
  apr-util-openssl-1.6.1-6.el8.x86_64                                           
  httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                          
  httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch               
  httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                    
  mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                        
  redhat-logos-httpd-84.5-1.el8.noarch                                          

Complete!

mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64
redhat-logos-httpd-84.5-1.el8.noarch

Complete!


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值