Linux學習-通過光碟配置本地yum源
本例通過虛擬機器Centos6系統完成
- 先確認光碟機已存在光碟,並且裝置的狀態是已連線。
- 掛載光碟到本地目錄
#掛載光碟到本地目錄
[root@localhost ~]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
- 進入到/etc/yum.repos.d目錄,配置repo檔案
[root@localhost mnt]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# mkdir bak
[root@localhost yum.repos.d]# mv *.repo bak
[root@localhost yum.repos.d]# vi local.repo
#local.repo檔案內容
[CentOS-dvd]
name=Centos $releasever - DVD
baseurl=file:///mnt/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/REM-GPG-KEY-CentOS-6
#複製REM-GPG-KEY-CentOS-6檔案到/etc/pki/rpm-gpg/目錄
[root@localhost mnt]# cp RPM-GPG-KEY-CentOS-6 /etc/pki/rpm-gpg/REM-GPG-KEY-CentOS-6
[root@localhost yum.repos.d]# yum makecache
- 安裝軟體測試
[root@localhost mnt]# yum install -y man
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package man.x86_64 0:1.6f-39.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
man x86_64 1.6f-39.el6 CentOS-dvd 265 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 265 k
Installed size: 389 k
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/REM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
From : /etc/pki/rpm-gpg/REM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : man-1.6f-39.el6.x86_64 1/1
Verifying : man-1.6f-39.el6.x86_64 1/1
Installed:
man.x86_64 0:1.6f-39.el6
Complete!
- 軟體安裝成功,yum源配置成功
相關文章
- Linux系統配置本地yum源Linux
- linux配置本地ISO的yum源Linux
- 不需上網,本地光碟yum源的搭建
- 小凡帶你搭建本地的光碟yum源
- linux配置本地yum源 centos7.9為例LinuxCentOS
- 搭建本地yum源,使用安裝光碟的rpm作為yum源的檔案
- oel 7 本地yum源配置
- Centos-Stream 配置本地yum源和配置阿里雲yum源CentOS阿里
- centos-7.6配置本地yum源CentOS
- 02_2__配置本地YUM源
- RedHat8 配置本地yum源Redhat
- yum本地源和外網源的配置方法
- Linux yum源配置以及yum命令講解Linux
- linux 5&6&7 本地yum配置Linux
- 本地yum源搭建
- centos同步yum源到本地,建立本地網路yum源CentOS
- Linux 配置本地源 (Ubuntu / CentOS)LinuxUbuntuCentOS
- yum 配置源
- 配置yum源
- CentOS8配置本地yumCentOS
- CentOS 配置yum源CentOS
- yum源配置大全
- Linux伺服器---本地yumLinux伺服器
- 配置RHEL8本地yum源及DNF簡介
- `centos7`系統構建本地yum源並配置共享CentOS
- linux yum 源部署Linux
- 通過 hosts檔案配置本地域名
- CentOS6配置清華大學yum源CentOS
- CentOS6.9配置yum源CentOS
- Centos 7 常用yum源配置CentOS
- Centos系統配置yum源CentOS
- CentOS6.8配置yum源CentOS
- centos7.5配置yum源CentOS
- RHEL7 yum源配置
- CentOS7--配置yum源CentOS
- Linux CentOS 7 更新yum源LinuxCentOS
- 小知識:CentOS配置yum源/解決yum源失效問題CentOS
- Centos7配置阿里epel源|yum源CentOS阿里