linux之yum

1.环境:RedHat5.4  x86_64

cd /etc/yum.repos.d/  
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
mv rhel-debuginfo.repo rhel-debuginfo.repo_ora
mv CentOS-Base.repo rhel-debuginfo.repo
yum clean all
yum makecache

 环境:没有网络,配置本地yum源

mount /dev/cdrom /mnt
cd /etc/yum.repos.d
find ./* -exec mv {} {}_bak \;
vim /etc/yum.repos.d/dvd.repo

[dvd]
name=install dvd
baseurl=file:///mnt
enabled=1
gpgcheck=0
yum makecache

只下载不安装rpm包

yum install 包名 -y --downloadonly --downloaddir=/usr/local/src

 

你可能感兴趣的:(linux之yum)