Linux:rhel8本地挂载安装_练习_24.5.11

rhel8本地挂载安装

挂载光盘

先确定需要挂载的目录,我这里挂载的目录是/mnt/cdrom 可以自己创建

# 创建挂载目录
[root@localhost ~]# mkdir /mnt/cdrom
# 挂载光盘
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
# 进入yum源目录修改为本地yum源
[root@localhost ~]# cd /etc/yum.repos.d/
# 查看目录下的文件
[root@localhost yum.repos.d]# ll
total 4
-rw-r--r--. 1 root root 51 May 11 09:09 redhat.repo
# 创建备份文件夹
[root@localhost yum.repos.d]# mkdir bak
# 将.repo后缀的文件全部移动到bak目录下
[root@localhost yum.repos.d]# mv *.repo bak/
# 再次查看,没有repo文件
[root@localhost yum.repos.d]# ll
total 0
drwxr-xr-x. 2 root root 25 May 11 09:32 bak

新增/修改repo文件(redhat文件名称可以自定义修改)

vi redhat.repo

mnt/cdrom修改为自己挂载的目录路径,yum1yum2均可自定义修改,不可重复

[yum1]
baseurl=file:////mnt/cdrom/AppStream
gpgcheck=0
enabled=1
[yum2]
baseurl=file:////mnt/cdrom/BaseOS
gpgcheck=0
enabled=1

安装

# 安装
[root@localhost yum.repos.d]# dnf install samba* -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'yxj' is missing name in configuration, using id.
Repository 'yzh' is missing name in configuration, using id.
yxj                                                                                 18 MB/s | 2.2 MB     00:00    
yzh                                                                                 32 MB/s | 5.3 MB     00:00    
Last metadata expiration check: 0:00:01 ago on Sat 11 May 2024 09:42:25 AM CST.
Package samba-client-libs-4.9.1-8.el8.x86_64 is already installed.
Package samba-common-4.9.1-8.el8.noarch is already installed.
Package samba-common-libs-4.9.1-8.el8.x86_64 is already installed.
Dependencies resolved.
===================================================================================================================
 Package                                  Arch                 Version                     Repository         Size
===================================================================================================================
Installing:
 samba                                    x86_64               4.9.1-8.el8                 yxj               708 k
 samba-client                             x86_64               4.9.1-8.el8                 yxj               636 k
 samba-common-tools                       x86_64               4.9.1-8.el8                 yxj               461 k
 samba-dc-libs                            x86_64               4.9.1-8.el8                 yxj                83 k
 samba-krb5-printing                      x86_64               4.9.1-8.el8                 yxj                94 k
 samba-libs                               x86_64               4.9.1-8.el8                 yxj               177 k
 samba-pidl                               noarch               4.9.1-8.el8                 yxj               186 k
 samba-test                               x86_64               4.9.1-8.el8                 yxj               198 k
 samba-test-libs                          x86_64               4.9.1-8.el8                 yxj               109 k
 samba-winbind                            x86_64               4.9.1-8.el8                 yxj               558 k
 samba-winbind-clients                    x86_64               4.9.1-8.el8                 yxj               143 k
 samba-winbind-krb5-locator               x86_64               4.9.1-8.el8                 yxj                90 k
 samba-winbind-modules                    x86_64               4.9.1-8.el8                 yxj               120 k
Installing dependencies:
 perl-Parse-Yapp                          noarch               1.21-2.el8                  yxj                53 k

Transaction Summary
===================================================================================================================
Install  14 Packages

Total size: 3.5 M
Installed size: 8.6 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                           1/1 
  Installing       : samba-libs-4.9.1-8.el8.x86_64                                                            1/14 
  Running scriptlet: samba-libs-4.9.1-8.el8.x86_64                                                            1/14 
  Installing       : samba-common-tools-4.9.1-8.el8.x86_64                                                    2/14 
  Installing       : samba-4.9.1-8.el8.x86_64                                                                 3/14 
  Running scriptlet: samba-4.9.1-8.el8.x86_64                                                                 3/14 
  Installing       : samba-test-libs-4.9.1-8.el8.x86_64                                                       4/14 
  Installing       : samba-winbind-modules-4.9.1-8.el8.x86_64                                                 5/14 
  Running scriptlet: samba-winbind-modules-4.9.1-8.el8.x86_64                                                 5/14 
  Running scriptlet: samba-winbind-4.9.1-8.el8.x86_64                                                         6/14 
  Installing       : samba-winbind-4.9.1-8.el8.x86_64                                                         6/14 
  Running scriptlet: samba-winbind-4.9.1-8.el8.x86_64                                                         6/14 
  Installing       : samba-client-4.9.1-8.el8.x86_64                                                          7/14 
  Running scriptlet: samba-client-4.9.1-8.el8.x86_64                                                          7/14 
  Installing       : perl-Parse-Yapp-1.21-2.el8.noarch                                                        8/14 
  Installing       : samba-pidl-4.9.1-8.el8.noarch                                                            9/14 
  Installing       : samba-krb5-printing-4.9.1-8.el8.x86_64                                                  10/14 
  Running scriptlet: samba-krb5-printing-4.9.1-8.el8.x86_64                                                  10/14 
  Installing       : samba-test-4.9.1-8.el8.x86_64                                                           11/14 
  Running scriptlet: samba-test-4.9.1-8.el8.x86_64                                                           11/14 
  Installing       : samba-winbind-clients-4.9.1-8.el8.x86_64                                                12/14 
  Installing       : samba-winbind-krb5-locator-4.9.1-8.el8.x86_64                                           13/14 
  Running scriptlet: samba-winbind-krb5-locator-4.9.1-8.el8.x86_64                                           13/14 
  Installing       : samba-dc-libs-4.9.1-8.el8.x86_64                                                        14/14 
  Running scriptlet: samba-dc-libs-4.9.1-8.el8.x86_64                                                        14/14 
  Verifying        : perl-Parse-Yapp-1.21-2.el8.noarch                                                        1/14 
  Verifying        : samba-4.9.1-8.el8.x86_64                                                                 2/14 
  Verifying        : samba-client-4.9.1-8.el8.x86_64                                                          3/14 
  Verifying        : samba-common-tools-4.9.1-8.el8.x86_64                                                    4/14 
  Verifying        : samba-dc-libs-4.9.1-8.el8.x86_64                                                         5/14 
  Verifying        : samba-krb5-printing-4.9.1-8.el8.x86_64                                                   6/14 
  Verifying        : samba-libs-4.9.1-8.el8.x86_64                                                            7/14 
  Verifying        : samba-pidl-4.9.1-8.el8.noarch                                                            8/14 
  Verifying        : samba-test-4.9.1-8.el8.x86_64                                                            9/14 
  Verifying        : samba-test-libs-4.9.1-8.el8.x86_64                                                      10/14 
  Verifying        : samba-winbind-4.9.1-8.el8.x86_64                                                        11/14 
  Verifying        : samba-winbind-clients-4.9.1-8.el8.x86_64                                                12/14 
  Verifying        : samba-winbind-krb5-locator-4.9.1-8.el8.x86_64                                           13/14 
  Verifying        : samba-winbind-modules-4.9.1-8.el8.x86_64                                                14/14 
Installed products updated.

Installed:
  samba-4.9.1-8.el8.x86_64                              samba-client-4.9.1-8.el8.x86_64                           
  samba-common-tools-4.9.1-8.el8.x86_64                 samba-dc-libs-4.9.1-8.el8.x86_64                          
  samba-krb5-printing-4.9.1-8.el8.x86_64                samba-libs-4.9.1-8.el8.x86_64                             
  samba-pidl-4.9.1-8.el8.noarch                         samba-test-4.9.1-8.el8.x86_64                             
  samba-test-libs-4.9.1-8.el8.x86_64                    samba-winbind-4.9.1-8.el8.x86_64                          
  samba-winbind-clients-4.9.1-8.el8.x86_64              samba-winbind-krb5-locator-4.9.1-8.el8.x86_64             
  samba-winbind-modules-4.9.1-8.el8.x86_64              perl-Parse-Yapp-1.21-2.el8.noarch                         

Complete!

检查安装

# 查看是否安装
[root@localhost yum.repos.d]# rpm -qa|grep samba 
samba-winbind-modules-4.9.1-8.el8.x86_64
samba-winbind-krb5-locator-4.9.1-8.el8.x86_64
samba-common-tools-4.9.1-8.el8.x86_64
samba-krb5-printing-4.9.1-8.el8.x86_64
samba-common-4.9.1-8.el8.noarch
samba-client-libs-4.9.1-8.el8.x86_64
samba-4.9.1-8.el8.x86_64
samba-client-4.9.1-8.el8.x86_64
samba-test-4.9.1-8.el8.x86_64
samba-common-libs-4.9.1-8.el8.x86_64
samba-test-libs-4.9.1-8.el8.x86_64
samba-winbind-clients-4.9.1-8.el8.x86_64
samba-libs-4.9.1-8.el8.x86_64
samba-pidl-4.9.1-8.el8.noarch
samba-winbind-4.9.1-8.el8.x86_64
samba-dc-libs-4.9.1-8.el8.x86_64
温馨提示:本文最后更新于2024-05-14 16:26:08,某些文章具有时效性,若有错误或已失效,请在下方留言或联系站长
© 版权声明
THE END
喜欢就支持一下吧
点赞1 分享
相关推荐
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情

    暂无评论内容