一、Redhat7源
上一個文章介紹了如何配置的Redhat7的YUM網絡源:[Linux]Redhat7配置CentOS7 YUM源 。如果在無法聯網的情況下,可以使用鏡像文件作為源安裝需要的包。
1.掛載ISO鏡像:
虛擬機掛載ISO(略),如果是GUI的Redhat7可以看到掛載后桌面顯示DVD的圖標:
2.掛載光盤:mount /dev/cdrom /mnt
3.備份repo文件:cp etc/yum.repos.d/*.repo old
4.刪除repo文件:rm -rf etc/yum.repos.d/*.repo
5.創建yum的源文件: vi /etc/yum.repos.d/my.repo
[centos-yum]
baseurl=file:///mnt
enabled=1
gpgcheck=0
6.安裝需要的軟件:yum -y install httpd