linux掛載映象源的兩種方法
虛擬機器:[[email protected] Desktop]# mount -o loop /dev/cdrom /iso
本地源
修改配置檔案
vim /etc/yum.repos.d/local.repo
[local] ---軟體倉庫名稱
name=this is local yum ---註釋
baseurl=file:///iso ---yum源路徑
gpgcheck=0 ---是否校驗(0-不校驗 |1-校驗)
vim /etc/yum.repos.d/local.repo
[local] ---軟體倉庫名稱
name=this is local yum ---註釋
baseurl=file:///media/RHEL_6.5\ x86_64\ Disc\ 1/
---yum源路徑
gpgcheck=1 ---是否校驗(0-不校驗 |1-校驗)
enabled=1 ---是否開啟配置(0-不開|1-開啟)
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ----金鑰位置
[
[[email protected] Desktop]# yum list |grep zsh
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'base' is missing name in configuration, using id
zsh.x86_64 4.3.10-7.el6 @base
軟體包名稱 軟體包版本 @代表已安裝 base軟體倉庫名稱
***************************************************************************************************
yum list ----列出軟體包
yum install ----安裝
yum erase ----解除安裝
yum remove ----解除安裝
yum makecache ----將軟體源快取(網路源)
yum search ----搜尋軟體 yum list |grep zsh == yum search zsh
yum update ----更新軟體
yum grouplist ----列出一組軟體包
yum groupinstall "X Window System" -----安裝圖形介面
yum groupinstall "Chinese Support" -----安裝中文支援
yum groupinstall “中文支援”
yum groupinstall "Development Tools" ----安裝開發工具
yum groupinstall "開發工具"
***************************************************************************************************
網路源
vim /etc/yum.repos.d/network.repo
[network]
name=this is ftp network yum
baseurl=ftp://172.16.13.250/pub/iso/ ----區域網
gpgcheck=0
enabled=1
[aliyun]
name=this is from aliyun mirrors yum
baseurl=https://mirrors.aliyun.com/centos/6/os/x86_64/ ----阿里雲映象站(公網)
gpgcheck=0
enabled=1
開機自動掛載:
vim /etc/rc.local
mount -o loop /dev/cdrom /iso ----虛擬機器設定
mount -o loop /vm/rhel-server-6.5-x86_64-dvd.iso /iso ----真機設定