Red Hat6 安装本地yum源文件

来源:互联网 发布:linux编译php扩展 编辑:程序博客网 时间:2024/05/21 17:06

光盘yum源搭建:

a. 挂载光盘

b.编辑yum源文件

c.清除原yum源列表

d.更新yum源列表,使用yum安装rpm包

--------------------------------------------------------------------------------------

[root@localhost ~]# mount /dev/sr0 /mnt/cdrom/

[root@localhost ~]#  cd /etc/yum.repos.d/

[root@localhost yum.repos.d]#  vim rhel-debuginfo.repo

[rhel-debuginfo]

name=Red Hat Enterprise Linux $releasever-$basesearch-Debug

baseurl=file:///mnt/cdrom

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releaseq

[root@localhost yum.repos.d]#ls

rhel-debuginfo.repo

[root@localhost yum.repos.d]#yum clean all

[root@localhost yum.repos.d]#yum list

------------------------------------------------------------------------------------------

可以使用yum -y 包名 安装所需要的包了



0 0
原创粉丝点击